diff --git a/client/render/scene_data.cpp b/client/render/scene_data.cpp index 18aed772..03fe7212 100644 --- a/client/render/scene_data.cpp +++ b/client/render/scene_data.cpp @@ -470,11 +470,18 @@ public: if (it != images.end()) return it->second; - 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); + try + { + 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); - images.emplace(index, image); - return image; + images.emplace(index, image); + return image; + } + catch (...) + { + return nullptr; + } } std::vector> load_all_textures()