From cf092eb53430184dda7af90f3b63b35a53f63bbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Sun, 15 Nov 2020 23:09:10 +0100 Subject: [PATCH] Fix crash when drag-dropping texture packs. Fixes the main part of #13614 . Still some weirdness going on with error checking though. --- UI/InstallZipScreen.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/UI/InstallZipScreen.cpp b/UI/InstallZipScreen.cpp index 0f5f79551d..3f871e348f 100644 --- a/UI/InstallZipScreen.cpp +++ b/UI/InstallZipScreen.cpp @@ -116,12 +116,16 @@ void InstallZipScreen::update() { progressBar_->SetVisibility(V_VISIBLE); progressBar_->SetProgress(g_GameManager.GetCurrentInstallProgressPercentage()); } - backChoice_->SetEnabled(false); + if (backChoice_) { + backChoice_->SetEnabled(false); + } } else { if (progressBar_) { progressBar_->SetVisibility(V_GONE); } - backChoice_->SetEnabled(true); + if (backChoice_) { + backChoice_->SetEnabled(true); + } std::string err = g_GameManager.GetInstallError(); if (!err.empty()) { if (doneView_)