From b739bd263281d69b79d44e87f49bbf3cec2b2035 Mon Sep 17 00:00:00 2001 From: Steveice10 <1269164+Steveice10@users.noreply.github.com> Date: Mon, 7 Aug 2023 18:21:42 -0700 Subject: [PATCH] qt: Fix double dialog and crash when OpenGL is selected on unsupported platform. (#6867) --- src/citra_qt/main.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/citra_qt/main.cpp b/src/citra_qt/main.cpp index 53b67f9f99..c65046744c 100644 --- a/src/citra_qt/main.cpp +++ b/src/citra_qt/main.cpp @@ -1071,8 +1071,10 @@ bool GMainWindow::LoadROM(const QString& filename) { ShutdownGame(); } - render_window->InitRenderTarget(); - secondary_window->InitRenderTarget(); + if (!render_window->InitRenderTarget() || !secondary_window->InitRenderTarget()) { + LOG_CRITICAL(Frontend, "Failed to initialize render targets!"); + return false; + } const auto scope = render_window->Acquire();