From 46034975e934a7b132990c3c7f8e4398d541bc35 Mon Sep 17 00:00:00 2001 From: WrinklyNinja Date: Thu, 31 Oct 2013 11:42:25 +0000 Subject: [PATCH] Fixed issue #77. --- src/gui/main.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/gui/main.cpp b/src/gui/main.cpp index 0704e2a3..9f303f0f 100644 --- a/src/gui/main.cpp +++ b/src/gui/main.cpp @@ -681,7 +681,8 @@ void Launcher::OnSortPlugins(wxCommandEvent& event) { BOOST_LOG_TRIVIAL(debug) << "Performing a topological sort."; boss::Sort(graph, plugins); - progDia->Pulse(); + progDia->Destroy(); + progDia = NULL; BOOST_LOG_TRIVIAL(debug) << "Displaying load order preview."; LoadOrderPreview preview(this, translate("BOSS: Calculated Load Order"), plugins); @@ -820,17 +821,14 @@ void Launcher::OnSortPlugins(wxCommandEvent& event) { translate("BOSS: Error"), wxOK | wxICON_ERROR, this); - progDia->Destroy(); + if (progDia != NULL) + progDia->Destroy(); return; } - progDia->Pulse(); - //Now a results report definitely exists. ViewButton->Enable(true); - progDia->Destroy(); - BOOST_LOG_TRIVIAL(debug) << "Displaying report..."; if (_settings["View Report Externally"] && _settings["View Report Externally"].as()) { wxLaunchDefaultApplication(_game.ReportPath().string());