From ff77bd029f91ac5288b90d96ea3e330cc778555e Mon Sep 17 00:00:00 2001 From: Stenzek Date: Sun, 14 Jul 2024 00:01:06 +1000 Subject: [PATCH] ImGuiFullscreen: Don't upload failed-loaded images --- src/util/imgui_fullscreen.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/util/imgui_fullscreen.cpp b/src/util/imgui_fullscreen.cpp index 503d46351..1ce43a8ff 100644 --- a/src/util/imgui_fullscreen.cpp +++ b/src/util/imgui_fullscreen.cpp @@ -295,7 +295,10 @@ std::optional ImGuiFullscreen::LoadTextureImage(std::string_view pat { image = RGBA8Image(); if (!image->LoadFromFile(path_str.c_str(), fp.get())) + { ERROR_LOG("Failed to read texture file '{}'", path); + image.reset(); + } } else {