diff --git a/examples/Capi.cpp b/examples/Capi.cpp index 0ca4afdc..4a599e8f 100644 --- a/examples/Capi.cpp +++ b/examples/Capi.cpp @@ -217,7 +217,7 @@ void contents() animation = tvg_animation_new(); Tvg_Paint* pict_lottie = tvg_animation_get_picture(animation); - if (tvg_picture_load_data(pict_lottie, data, data_size, nullptr, nullptr, false) != TVG_RESULT_SUCCESS) { + if (tvg_picture_load_data(pict_lottie, data, data_size, "lot", nullptr, false) != TVG_RESULT_SUCCESS) { printf("Problem with loading a lottie file\n"); tvg_animation_del(animation); } else { diff --git a/src/renderer/tvgLoader.cpp b/src/renderer/tvgLoader.cpp index 2719c727..c9fa0ac2 100644 --- a/src/renderer/tvgLoader.cpp +++ b/src/renderer/tvgLoader.cpp @@ -205,7 +205,7 @@ static LoadModule* _findFromCache(const char* filename) ScopedLock lock(key); INLIST_FOREACH(_activeLoaders, loader) { - if (loader->cached && !strcmp(loader->hashpath, filename)) { + if (loader->cached && loader->hashpath && !strcmp(loader->hashpath, filename)) { ++loader->sharing; return loader; }