[gnote/gnome-3-24] Fix possible crash when deleting a notebook
- From: Aurimas ÄŒernius <aurimasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnote/gnome-3-24] Fix possible crash when deleting a notebook
- Date: Sun, 20 Aug 2017 13:00:09 +0000 (UTC)
commit 6ff16cd168cc60df8713cd14a3fa2f9e07508b26
Author: Aurimas ÄŒernius <aurisc4 gmail com>
Date: Sun Jul 9 21:18:45 2017 +0300
Fix possible crash when deleting a notebook
Fixes Bug 701846
src/notebooks/notebookmanager.cpp | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/notebooks/notebookmanager.cpp b/src/notebooks/notebookmanager.cpp
index b9264ac..d796fe2 100644
--- a/src/notebooks/notebookmanager.cpp
+++ b/src/notebooks/notebookmanager.cpp
@@ -184,10 +184,10 @@ namespace gnote {
}
Gtk::TreeIter iter = map_iter->second;;
+ // first remove notebook from map, then from store, because the later cases a UI refresh, that can
query back here
+ m_notebookMap.erase(map_iter);
m_notebooks->erase (iter);
-
- m_notebookMap.erase (map_iter);
-
+
// Remove the notebook tag from every note that's in the notebook
std::list<NoteBase*> notes;
Tag::Ptr tag = notebook->get_tag();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]