mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-11 00:29:11 +01:00
Merge pull request #9226 from JosJuice/bootparameters-nullptr
Fix dereferencing nullptr BootParameters
This commit is contained in:
commit
6a4ac74ec4
@ -513,12 +513,16 @@ static void Run(JNIEnv* env, const std::vector<std::string>& paths,
|
|||||||
|
|
||||||
WiimoteReal::InitAdapterClass();
|
WiimoteReal::InitAdapterClass();
|
||||||
|
|
||||||
// No use running the loop when booting fails
|
|
||||||
s_have_wm_user_stop = false;
|
s_have_wm_user_stop = false;
|
||||||
|
|
||||||
std::unique_ptr<BootParameters> boot = BootParameters::GenerateFromFile(paths, savestate_path);
|
std::unique_ptr<BootParameters> boot = BootParameters::GenerateFromFile(paths, savestate_path);
|
||||||
|
if (boot)
|
||||||
boot->delete_savestate = delete_savestate;
|
boot->delete_savestate = delete_savestate;
|
||||||
|
|
||||||
WindowSystemInfo wsi(WindowSystemType::Android, nullptr, s_surf, s_surf);
|
WindowSystemInfo wsi(WindowSystemType::Android, nullptr, s_surf, s_surf);
|
||||||
wsi.render_surface_scale = GetRenderSurfaceScale(env);
|
wsi.render_surface_scale = GetRenderSurfaceScale(env);
|
||||||
|
|
||||||
|
// No use running the loop when booting fails
|
||||||
if (BootManager::BootCore(std::move(boot), wsi))
|
if (BootManager::BootCore(std::move(boot), wsi))
|
||||||
{
|
{
|
||||||
ButtonManager::Init(SConfig::GetInstance().GetGameID());
|
ButtonManager::Init(SConfig::GetInstance().GetGameID());
|
||||||
|
@ -951,7 +951,7 @@ void MainWindow::StartGame(const std::vector<std::string>& paths,
|
|||||||
|
|
||||||
void MainWindow::StartGame(std::unique_ptr<BootParameters>&& parameters)
|
void MainWindow::StartGame(std::unique_ptr<BootParameters>&& parameters)
|
||||||
{
|
{
|
||||||
if (std::holds_alternative<BootParameters::Disc>(parameters->parameters))
|
if (parameters && std::holds_alternative<BootParameters::Disc>(parameters->parameters))
|
||||||
{
|
{
|
||||||
if (std::get<BootParameters::Disc>(parameters->parameters).volume->IsNKit())
|
if (std::get<BootParameters::Disc>(parameters->parameters).volume->IsNKit())
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user