Qt: Fix crashes when looking up info in No-Intro DB
Jeffrey Pfau jeffrey@endrift.com
Thu, 18 Feb 2016 21:53:13 -0800
2 files changed,
3 insertions(+),
3 deletions(-)
M
src/platform/qt/ROMInfo.cpp
→
src/platform/qt/ROMInfo.cpp
@@ -70,7 +70,7 @@ }
if (crc32) { m_ui.crc->setText(QString::number(crc32, 16)); if (db) { - NoIntroGame game; + NoIntroGame game{}; if (NoIntroDBLookupGameByCRC(db, crc32, &game)) { m_ui.name->setText(game.name); } else {
M
src/platform/qt/Window.cpp
→
src/platform/qt/Window.cpp
@@ -735,7 +735,7 @@
m_controller->threadInterrupt(); if (m_controller->isLoaded()) { const NoIntroDB* db = GBAApp::app()->gameDB(); - NoIntroGame game; + NoIntroGame game{}; uint32_t crc32 = 0; switch (m_controller->thread()->core->platform(m_controller->thread()->core)) {@@ -758,7 +758,7 @@ break;
} if (db && crc32) { - NoIntroDBLookupGameByCRC(db, crc32, &game); + NoIntroDBLookupGameByCRC(db, crc32, &game); title = QLatin1String(game.name); } else { char gameTitle[17] = { '\0' };