From 3cc20e5550375763588485c395403707bf5add84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Sun, 5 Jul 2020 01:49:34 +0200 Subject: [PATCH] Sneak in some paranoia in InstallZipScreen.cpp (another one from #13057) --- UI/InstallZipScreen.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/UI/InstallZipScreen.cpp b/UI/InstallZipScreen.cpp index 2a7bda7d1c..873ddaf0c5 100644 --- a/UI/InstallZipScreen.cpp +++ b/UI/InstallZipScreen.cpp @@ -81,6 +81,9 @@ void InstallZipScreen::CreateViews() { returnToHomebrew_ = false; } else { leftColumn->Add(new TextView(iz->T("Zip file does not contain PSP software"), ALIGN_LEFT, false, new AnchorLayoutParams(10, 10, NONE, NONE))); + doneView_ = nullptr; + progressBar_ = nullptr; + installChoice_ = nullptr; backChoice_ = rightColumnItems->Add(new Choice(di->T("Back"))); } @@ -99,7 +102,9 @@ bool InstallZipScreen::key(const KeyInput &key) { UI::EventReturn InstallZipScreen::OnInstall(UI::EventParams ¶ms) { if (g_GameManager.InstallGameOnThread(zipPath_, zipPath_, deleteZipFile_)) { installStarted_ = true; - installChoice_->SetEnabled(false); + if (installChoice_) { + installChoice_->SetEnabled(false); + } } return UI::EVENT_DONE; }