diff --git a/Source/Android/jni/MainAndroid.cpp b/Source/Android/jni/MainAndroid.cpp index 24eb23b75e..bc37212fe6 100644 --- a/Source/Android/jni/MainAndroid.cpp +++ b/Source/Android/jni/MainAndroid.cpp @@ -513,12 +513,16 @@ static void Run(JNIEnv* env, const std::vector& paths, WiimoteReal::InitAdapterClass(); - // No use running the loop when booting fails s_have_wm_user_stop = false; + std::unique_ptr boot = BootParameters::GenerateFromFile(paths, savestate_path); - boot->delete_savestate = delete_savestate; + if (boot) + boot->delete_savestate = delete_savestate; + WindowSystemInfo wsi(WindowSystemType::Android, nullptr, s_surf, s_surf); wsi.render_surface_scale = GetRenderSurfaceScale(env); + + // No use running the loop when booting fails if (BootManager::BootCore(std::move(boot), wsi)) { ButtonManager::Init(SConfig::GetInstance().GetGameID()); diff --git a/Source/Core/DolphinQt/MainWindow.cpp b/Source/Core/DolphinQt/MainWindow.cpp index 92f57bac47..069af901fb 100644 --- a/Source/Core/DolphinQt/MainWindow.cpp +++ b/Source/Core/DolphinQt/MainWindow.cpp @@ -951,7 +951,7 @@ void MainWindow::StartGame(const std::vector& paths, void MainWindow::StartGame(std::unique_ptr&& parameters) { - if (std::holds_alternative(parameters->parameters)) + if (parameters && std::holds_alternative(parameters->parameters)) { if (std::get(parameters->parameters).volume->IsNKit()) {