diff options
| author | JosJuice <josjuice@gmail.com> | 2020-11-06 09:34:53 +0100 |
|---|---|---|
| committer | JosJuice <josjuice@gmail.com> | 2020-11-06 09:34:53 +0100 |
| commit | a348efe947c0e2e31b98d802c1d60b79d71a143b (patch) | |
| tree | be12729f2395b8f425db2291e32b9e303faa3248 /Source/Android/jni/MainAndroid.cpp | |
| parent | 4d1c1bea34dd3ca327dc599068e46328108619c8 (diff) | |
Fix dereferencing nullptr BootParameters
Diffstat (limited to 'Source/Android/jni/MainAndroid.cpp')
| -rw-r--r-- | Source/Android/jni/MainAndroid.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
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<std::string>& paths, WiimoteReal::InitAdapterClass(); - // No use running the loop when booting fails s_have_wm_user_stop = false; + std::unique_ptr<BootParameters> 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()); |
