diff options
author | Nadia Holmquist Pedersen <nadia@nhp.sh> | 2023-12-22 02:17:26 +0100 |
---|---|---|
committer | Nadia Holmquist Pedersen <nadia@nhp.sh> | 2023-12-22 02:17:26 +0100 |
commit | 521fc249a3b95b66147be848a63d29e4425d4c5d (patch) | |
tree | e3577047fbc5aea3b7b2c80964549c4a65606249 | |
parent | 752b37ed824ceb521f61f1a0c79b022efd9cef12 (diff) |
Don't try to call transferLayout on non-GL ScreenPanel
-rw-r--r-- | src/frontend/qt_sdl/main.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/frontend/qt_sdl/main.cpp b/src/frontend/qt_sdl/main.cpp index 0d775a5..cd84988 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<ScreenPanelGL*>(mainWindow->panel)->transferLayout(this); + auto glPanel = dynamic_cast<ScreenPanelGL*>(mainWindow->panel); + if (glPanel) glPanel->transferLayout(this); } std::unique_ptr<NDS> EmuThread::CreateConsole( |