[gnote] Avoid a crash in a race condition when deleting a note.
- From: Hubert Figuière <hub src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnote] Avoid a crash in a race condition when deleting a note.
- Date: Tue, 30 Jun 2009 08:04:44 +0000 (UTC)
commit 3e0ec405997bcc9aa5523a7705a2b2c6bae3528e
Author: Hubert Figuiere <hub figuiere net>
Date: Tue Jun 30 03:32:09 2009 -0400
Avoid a crash in a race condition when deleting a note.
Closes #587395.
src/notewindow.cpp | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/notewindow.cpp b/src/notewindow.cpp
index f7598e1..2159618 100644
--- a/src/notewindow.cpp
+++ b/src/notewindow.cpp
@@ -194,7 +194,9 @@ namespace gnote {
NoteWindow::~NoteWindow()
{
delete m_global_keys;
+ m_global_keys = NULL;
delete m_mark_set_timeout;
+ m_mark_set_timeout = NULL;
Preferences::obj().remove_notify(m_gconf_notify);
}
@@ -293,7 +295,9 @@ namespace gnote {
void NoteWindow::on_selection_mark_set(const Gtk::TextIter&, const Glib::RefPtr<Gtk::TextMark>&)
{
// FIXME: Process in a timeout due to GTK+ bug #172050.
- m_mark_set_timeout->reset(0);
+ if(m_mark_set_timeout) {
+ m_mark_set_timeout->reset(0);
+ }
}
void NoteWindow::update_link_button_sensitivity()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]