Don't try to call transferLayout on non-GL ScreenPanel

This commit is contained in:
Nadia Holmquist Pedersen 2023-12-22 02:17:26 +01:00
parent 752b37ed82
commit 521fc249a3
1 changed files with 2 additions and 1 deletions

View File

@ -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(