mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-08 13:43:43 +00:00
renderer: hotfix a broken svg file sharing
Do not allow data sharing among same svg instances. This should be addressed properly.
This commit is contained in:
parent
4d8c0e9a64
commit
cebc29c5ff
1 changed files with 2 additions and 2 deletions
|
@ -294,10 +294,10 @@ LoadModule* LoaderMgr::loader(const string& path, bool* invalid)
|
||||||
{
|
{
|
||||||
*invalid = false;
|
*invalid = false;
|
||||||
|
|
||||||
//TODO: lottie is not sharable.
|
//TODO: svg & lottie is not sharable.
|
||||||
auto allowCache = true;
|
auto allowCache = true;
|
||||||
auto ext = path.substr(path.find_last_of(".") + 1);
|
auto ext = path.substr(path.find_last_of(".") + 1);
|
||||||
if (!ext.compare("json")) allowCache = false;
|
if (!ext.compare("svg") || !ext.compare("json")) allowCache = false;
|
||||||
|
|
||||||
if (allowCache) {
|
if (allowCache) {
|
||||||
if (auto loader = _findFromCache(path)) return loader;
|
if (auto loader = _findFromCache(path)) return loader;
|
||||||
|
|
Loading…
Add table
Reference in a new issue