diff --git a/modules/assimp/import_utils.h b/modules/assimp/import_utils.h index 7b14804ddc4..8135b352c69 100644 --- a/modules/assimp/import_utils.h +++ b/modules/assimp/import_utils.h @@ -394,7 +394,9 @@ public: return Ref(); } else { Ref texture = ResourceLoader::load(p_path); + ERR_FAIL_COND_V(texture.is_null(), Ref()); Ref image = texture->get_data(); + ERR_FAIL_COND_V(image.is_null(), Ref()); state.path_to_image_cache.insert(p_path, image); return image; }