all repos — mgba @ 5bd0bacb8bbf7eac890fb9570fcbb8ae1c28407d

mGBA Game Boy Advance Emulator

Qt: Fix crashes when looking up info in No-Intro DB
Jeffrey Pfau jeffrey@endrift.com
Thu, 18 Feb 2016 21:53:13 -0800
commit

5bd0bacb8bbf7eac890fb9570fcbb8ae1c28407d

parent

dc00c41855f4bbd14c69af1e10f9d197f757df0d

2 files changed, 3 insertions(+), 3 deletions(-)

jump to
M src/platform/qt/ROMInfo.cppsrc/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.cppsrc/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' };