From 5d70a95fe16bc213de6bb715a6e8bfae885d5ee1 Mon Sep 17 00:00:00 2001 From: "K. S. Ernest (iFire) Lee" Date: Wed, 20 Nov 2019 11:22:27 -0800 Subject: 33714 Check if the image is null before use. --- modules/assimp/import_utils.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/assimp/import_utils.h b/modules/assimp/import_utils.h index 7b14804ddc..8135b352c6 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; } -- cgit v1.2.3