Fix crash on desktop client

This commit is contained in:
Patrick Nicolas
2024-11-06 19:50:44 +01:00
parent 462b823a52
commit 45412e3389
+7
View File
@@ -470,12 +470,19 @@ public:
if (it != images.end()) if (it != images.end())
return it->second; return it->second;
try
{
auto [image_data, mime_type] = visit_source(gltf.images[index].data); auto [image_data, mime_type] = visit_source(gltf.images[index].data);
auto image = do_load_image(physical_device, device, queue, cb_pool, image_data, srgb); auto image = do_load_image(physical_device, device, queue, cb_pool, image_data, srgb);
images.emplace(index, image); images.emplace(index, image);
return image; return image;
} }
catch (...)
{
return nullptr;
}
}
std::vector<std::shared_ptr<scene_data::texture>> load_all_textures() std::vector<std::shared_ptr<scene_data::texture>> load_all_textures()
{ {