From 5b29a2bd5bf128bbf4a6bf386f4f79fe8d15b8e2 Mon Sep 17 00:00:00 2001 From: Sven Balzer <4653051+Kyuusokuna@users.noreply.github.com> Date: Tue, 25 Feb 2025 19:34:24 +0100 Subject: [PATCH] fix crash on minimize --- src/main.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index 3c27761..594dc58 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -898,6 +898,13 @@ int main(int argc, char **argv) { } } + if (!swapchain_texture) { + SDL_CancelGPUCommandBuffer(command_buffer); + ImGui::Render(); + ImDrawData *draw_data = ImGui::GetDrawData(); + continue; + } + per_frame.aspect_ratio = (float) window_width / (float) window_height; SDL_PushGPUVertexUniformData(command_buffer, 0, &per_frame, sizeof(per_frame));