From 521fc249a3b95b66147be848a63d29e4425d4c5d Mon Sep 17 00:00:00 2001 From: Nadia Holmquist Pedersen Date: Fri, 22 Dec 2023 02:17:26 +0100 Subject: [PATCH] Don't try to call transferLayout on non-GL ScreenPanel --- src/frontend/qt_sdl/main.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/frontend/qt_sdl/main.cpp b/src/frontend/qt_sdl/main.cpp index 0d775a58..cd84988a 100644 --- a/src/frontend/qt_sdl/main.cpp +++ b/src/frontend/qt_sdl/main.cpp @@ -202,7 +202,8 @@ EmuThread::EmuThread(QObject* parent) : QThread(parent) connect(this, SIGNAL(swapScreensToggle()), mainWindow->actScreenSwap, SLOT(trigger())); connect(this, SIGNAL(screenEmphasisToggle()), mainWindow, SLOT(onScreenEmphasisToggled())); - static_cast(mainWindow->panel)->transferLayout(this); + auto glPanel = dynamic_cast(mainWindow->panel); + if (glPanel) glPanel->transferLayout(this); } std::unique_ptr EmuThread::CreateConsole(