Qt: Fix backup load state (fixes #823)
Vicki Pfau vi@endrift.com
Tue, 25 Jul 2017 11:15:08 -0700
2 files changed,
4 insertions(+),
1 deletions(-)
M
src/platform/qt/CoreController.cpp
→
src/platform/qt/CoreController.cpp
@@ -408,7 +408,7 @@ CoreController* controller = static_cast<CoreController*>(context->userData);
if (!controller->m_backupLoadState.isOpen()) { controller->m_backupLoadState = VFileMemChunk(nullptr, 0); } - mCoreLoadStateNamed(context->core, controller->m_backupLoadState, controller->m_saveStateFlags); + mCoreSaveStateNamed(context->core, controller->m_backupLoadState, controller->m_saveStateFlags); if (mCoreLoadState(context->core, controller->m_stateSlot, controller->m_loadStateFlags)) { emit controller->frameAvailable(); emit controller->stateLoaded();
M
src/platform/qt/VFileDevice.cpp
→
src/platform/qt/VFileDevice.cpp
@@ -20,6 +20,9 @@ }
} void VFileDevice::close() { + if (!m_vf) { + return; + } QIODevice::close(); m_vf->close(m_vf); m_vf = nullptr;