citra-emu
/
citra-canary
Archived
1
0
Fork 0

Fix crash when loading an unsupported file.

The telemetry stuff isn't properly initialized when loading fails, resulting in a crash.
This commit is contained in:
muemart 2017-12-09 15:59:21 +01:00
parent 040006fa6b
commit bac776439b
1 changed files with 2 additions and 2 deletions

View File

@ -487,8 +487,6 @@ bool GMainWindow::LoadROM(const QString& filename) {
const Core::System::ResultStatus result{system.Load(render_window, filename.toStdString())}; const Core::System::ResultStatus result{system.Load(render_window, filename.toStdString())};
Core::Telemetry().AddField(Telemetry::FieldType::App, "Frontend", "Qt");
if (result != Core::System::ResultStatus::Success) { if (result != Core::System::ResultStatus::Success) {
switch (result) { switch (result) {
case Core::System::ResultStatus::ErrorGetLoader: case Core::System::ResultStatus::ErrorGetLoader:
@ -544,6 +542,8 @@ bool GMainWindow::LoadROM(const QString& filename) {
} }
return false; return false;
} }
Core::Telemetry().AddField(Telemetry::FieldType::App, "Frontend", "Qt");
return true; return true;
} }