diff options
| author | Jordan Woyak <jordan.woyak@gmail.com> | 2020-11-06 10:38:53 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-11-06 10:38:53 -0600 |
| commit | 6a4ac74ec407a20b0347c4c764ca528e8d692cc1 (patch) | |
| tree | be12729f2395b8f425db2291e32b9e303faa3248 /Source/Android/jni/MainAndroid.cpp | |
| parent | 4d1c1bea34dd3ca327dc599068e46328108619c8 (diff) | |
| parent | a348efe947c0e2e31b98d802c1d60b79d71a143b (diff) | |
Merge pull request #9226 from JosJuice/bootparameters-nullptr
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()); |
