Qt: Fix crash on invalid ROM loads
This commit is contained in:
parent
aa0ee743b3
commit
123dc18398
@ -306,6 +306,16 @@ void GameController::openGame(bool biosOnly) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!biosOnly) {
|
||||||
|
m_threadContext.core = mCoreFind(m_fname.toUtf8().constData());
|
||||||
|
} else {
|
||||||
|
m_threadContext.core = GBACoreCreate();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!m_threadContext.core) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
m_gameOpen = true;
|
m_gameOpen = true;
|
||||||
|
|
||||||
m_pauseAfterFrame = false;
|
m_pauseAfterFrame = false;
|
||||||
@ -317,13 +327,6 @@ void GameController::openGame(bool biosOnly) {
|
|||||||
m_threadContext.sync.videoFrameWait = m_videoSync;
|
m_threadContext.sync.videoFrameWait = m_videoSync;
|
||||||
m_threadContext.sync.audioWait = m_audioSync;
|
m_threadContext.sync.audioWait = m_audioSync;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (!biosOnly) {
|
|
||||||
m_threadContext.core = mCoreFind(m_fname.toUtf8().constData());
|
|
||||||
} else {
|
|
||||||
m_threadContext.core = GBACoreCreate();
|
|
||||||
}
|
|
||||||
m_threadContext.core->init(m_threadContext.core);
|
m_threadContext.core->init(m_threadContext.core);
|
||||||
|
|
||||||
unsigned width, height;
|
unsigned width, height;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user