mirror of https://github.com/mgba-emu/mgba.git
Qt: Fix crashes when looking up info in No-Intro DB
This commit is contained in:
parent
dc00c41855
commit
5bd0bacb8b
|
@ -70,7 +70,7 @@ ROMInfo::ROMInfo(GameController* controller, QWidget* parent)
|
|||
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 {
|
||||
|
|
|
@ -735,7 +735,7 @@ void Window::updateTitle(float fps) {
|
|||
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 @@ void Window::updateTitle(float fps) {
|
|||
}
|
||||
|
||||
if (db && crc32) {
|
||||
NoIntroDBLookupGameByCRC(db, crc32, &game);
|
||||
NoIntroDBLookupGameByCRC(db, crc32, &game);
|
||||
title = QLatin1String(game.name);
|
||||
} else {
|
||||
char gameTitle[17] = { '\0' };
|
||||
|
|
Loading…
Reference in New Issue