Fixed crash when editing an image in thumb browser without saving; see issue #620

This commit is contained in:
Oliver Duis
2011-04-06 19:51:26 +02:00
parent 4aa4030d90
commit 5bab7f4ca5
2 changed files with 26 additions and 7 deletions

View File

@@ -309,14 +309,18 @@ void FileBrowser::close () {
Glib::Mutex::Lock lock(entryMutex);
#endif
selected.clear ();
notifySelectionListener ();
// The listener merges parameters with old values, so delete afterwards
for (int i=0; i<fd.size(); i++)
{
delete fd[i];
}
fd.clear ();
selected.clear ();
}
notifySelectionListener ();
lastClicked = NULL;
}