[balsa] Recheck index->mailbox_node
- From: Peter Bloomfield <PeterB src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [balsa] Recheck index->mailbox_node
- Date: Sat, 27 Mar 2010 12:48:47 +0000 (UTC)
commit a100b36be443e617e8a01879e2ef5b0bab5904ac
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date: Sat Mar 27 08:07:20 2010 -0400
Recheck index->mailbox_node
* src/balsa-index.c (bndx_destroy): recheck index->mailbox_node
after dropping the gdk lock.
ChangeLog | 5 +++++
src/balsa-index.c | 10 +++++++---
2 files changed, 12 insertions(+), 3 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 8e28467..c5139f7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2010-03-27 Peter Bloomfield
+ * src/balsa-index.c (bndx_destroy): recheck index->mailbox_node
+ after dropping the gdk lock.
+
+2010-03-27 Peter Bloomfield
+
* libbalsa/mailbox.c (libbalsa_mailbox_close): increase mailbox
ref count while closing it.
diff --git a/src/balsa-index.c b/src/balsa-index.c
index 699b9a0..d823d88 100644
--- a/src/balsa-index.c
+++ b/src/balsa-index.c
@@ -229,9 +229,13 @@ bndx_destroy(GtkObject * obj)
libbalsa_mailbox_close(mailbox, balsa_app.expunge_on_close);
gdk_threads_enter();
}
- g_object_weak_unref(G_OBJECT(index->mailbox_node),
- (GWeakNotify) bndx_mbnode_weak_notify, index);
- index->mailbox_node = NULL;
+
+ if (index->mailbox_node) {
+ g_object_weak_unref(G_OBJECT(index->mailbox_node),
+ (GWeakNotify) bndx_mbnode_weak_notify,
+ index);
+ index->mailbox_node = NULL;
+ }
}
if (index->search_iter) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]