From fd2799c215d0a09e630975bf4d25e64949f30bcc Mon Sep 17 00:00:00 2001 From: WrinklyNinja Date: Sun, 9 Feb 2014 20:39:51 +0000 Subject: [PATCH] This should clear edges fine. Not entirely sure about what iterators get invalidated when. --- src/gui/main.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gui/main.cpp b/src/gui/main.cpp index 9b0f81a8..cc70e606 100644 --- a/src/gui/main.cpp +++ b/src/gui/main.cpp @@ -827,6 +827,10 @@ void Launcher::OnSortPlugins(wxCommandEvent& event) { } //Clear all existing edges from the graph. + std::pair edge_range = boost::edges(graph); + for (edge_it it = edge_range.first; it != edge_range.second; ++it) { + boost::remove_edge(*it, graph); + } //Save edits to the userlist. BOOST_LOG_TRIVIAL(trace) << "Merging down edits to the userlist.";