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());