renderer: hotfix crash

addressed extra corner case errors by
9e6a514022
This commit is contained in:
Hermet Park 2025-03-06 23:44:21 +09:00
parent 97b48a97c1
commit 28d653e22f
2 changed files with 2 additions and 2 deletions

View file

@ -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 {

View file

@ -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;
}