Skip to content

Commit

Permalink
Don't throw when missing texture during ondemand loading
Browse files Browse the repository at this point in the history
It can happen when the texture is deleted later
  • Loading branch information
Benau committed Sep 19, 2022
1 parent 25540fc commit bf0db04
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions lib/graphics_engine/src/ge_vulkan_texture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ extern "C"
}

#include <cassert>
#include <cstdio>
#include <IAttributes.h>
#include <IImageLoader.h>
#include <limits>
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit bf0db04

Please sign in to comment.