Don't throw when missing texture during ondemand loading

It can happen when the texture is deleted later
This commit is contained in:
Benau 2022-09-19 10:24:55 +08:00
parent 25540fc6a7
commit bf0db0497b

View File

@ -17,6 +17,7 @@ extern "C"
} }
#include <cassert> #include <cassert>
#include <cstdio>
#include <IAttributes.h> #include <IAttributes.h>
#include <IImageLoader.h> #include <IImageLoader.h>
#include <limits> #include <limits>
@ -489,8 +490,13 @@ void GEVulkanTexture::reloadInternal()
NULL, &m_size); NULL, &m_size);
if (texture_image == NULL) if (texture_image == NULL)
{ {
throw std::runtime_error( printf("Missing texture_image in getResizedImageFullPath when "
"Missing texture_image in getResizedImageFullPath"); "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 else