From bf0db0497ba5ebf33125c45ccfdb0f963d7dc042 Mon Sep 17 00:00:00 2001 From: Benau Date: Mon, 19 Sep 2022 10:24:55 +0800 Subject: [PATCH] Don't throw when missing texture during ondemand loading It can happen when the texture is deleted later --- lib/graphics_engine/src/ge_vulkan_texture.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/graphics_engine/src/ge_vulkan_texture.cpp b/lib/graphics_engine/src/ge_vulkan_texture.cpp index b9dcab2d27b..6ac923fcfb3 100644 --- a/lib/graphics_engine/src/ge_vulkan_texture.cpp +++ b/lib/graphics_engine/src/ge_vulkan_texture.cpp @@ -17,6 +17,7 @@ extern "C" } #include +#include #include #include #include @@ -489,8 +490,13 @@ void GEVulkanTexture::reloadInternal() NULL, &m_size); if (texture_image == NULL) { - throw std::runtime_error( - "Missing texture_image in getResizedImageFullPath"); + printf("Missing texture_image in getResizedImageFullPath when " + "reloadInternal during ondemand loading for %s\n", + m_full_path.c_str()); + m_size_lock.unlock(); + m_image_view_lock.unlock(); + m_thread_loading_lock.unlock(); + return; } } else