diff options
author | Jon Trowbridge <trow@gnu.org> | 2001-10-28 02:26:34 +0800 |
---|---|---|
committer | Jon Trowbridge <trow@src.gnome.org> | 2001-10-28 02:26:34 +0800 |
commit | 41fd8740f435090489e73b3540ace4d6dc1a18bf (patch) | |
tree | ca8204d04c9c2fd67fa0b03ee5f60b8d3bbad41a /addressbook | |
parent | 4ca07463a0cc329a01607a3cffc094b548bb4c13 (diff) | |
download | gsoc2013-evolution-41fd8740f435090489e73b3540ace4d6dc1a18bf.tar.gz gsoc2013-evolution-41fd8740f435090489e73b3540ace4d6dc1a18bf.tar.zst gsoc2013-evolution-41fd8740f435090489e73b3540ace4d6dc1a18bf.zip |
That should be a bonobo_object_unref, not a gtk_object_unref.
2001-10-27 Jon Trowbridge <trow@gnu.org>
* backend/pas/pas-book.c (pas_book_check_queue): That should be a
bonobo_object_unref, not a gtk_object_unref.
(pas_book_queue_request): Likewise, we need to bonobo_object_ref
here.
(pas_book_destroy): If our pas_book_check_queue timeout is still
active, disable it. This should never happen, but it never hurts
to be careful.
(pas_book_destroy): Set book->priv to NULL after we free it.
svn path=/trunk/; revision=14218
Diffstat (limited to 'addressbook')
-rw-r--r-- | addressbook/ChangeLog | 12 | ||||
-rw-r--r-- | addressbook/backend/pas/pas-book.c | 14 |
2 files changed, 24 insertions, 2 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index c1d0373ebe..b1a5153233 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,3 +1,14 @@ +2001-10-27 Jon Trowbridge <trow@gnu.org> + + * backend/pas/pas-book.c (pas_book_check_queue): That should be a + bonobo_object_unref, not a gtk_object_unref. + (pas_book_queue_request): Likewise, we need to bonobo_object_ref + here. + (pas_book_destroy): If our pas_book_check_queue timeout is still + active, disable it. This should never happen, but it never hurts + to be careful. + (pas_book_destroy): Set book->priv to NULL after we free it. + 2001-10-27 JP Rosevear <jpr@ximian.com> * conduit/address-conduit.c (local_record_from_ecard): copy phone @@ -13,6 +24,7 @@ (card_removed): don't touch on lookup (match): touch on lookup +>>>>>>> 1.878 2001-10-27 Jon Trowbridge <trow@ximian.com> * backend/pas/pas-book.c (pas_book_check_queue): Added paranoid diff --git a/addressbook/backend/pas/pas-book.c b/addressbook/backend/pas/pas-book.c index e67ae51842..d51d182dad 100644 --- a/addressbook/backend/pas/pas-book.c +++ b/addressbook/backend/pas/pas-book.c @@ -46,7 +46,7 @@ pas_book_check_queue (PASBook *book) if (book->priv->request_queue == NULL) { book->priv->timeout_id = 0; book->priv->timeout_lock = FALSE; - gtk_object_unref (GTK_OBJECT (book)); + bonobo_object_unref (BONOBO_OBJECT (book)); return FALSE; } @@ -62,7 +62,7 @@ pas_book_queue_request (PASBook *book, PASRequest *req) g_list_append (book->priv->request_queue, req); if (book->priv->timeout_id == 0) { - gtk_object_ref (GTK_OBJECT (book)); + bonobo_object_ref (BONOBO_OBJECT (book)); book->priv->timeout_id = g_timeout_add (20, (GSourceFunc) pas_book_check_queue, book); } } @@ -780,6 +780,15 @@ pas_book_destroy (GtkObject *object) } g_list_free (book->priv->request_queue); + /* We should never ever have timeout_id == 0 when we get destroyed, unless there + is some sort of reference counting bug. Still, we do this to try to avoid + horrible crashes in those situations. */ + if (book->priv->timeout_id) { + g_warning ("PASBook destroyed with non-zero timeout_id. This shouldn't happen."); + g_source_remove (book->priv->timeout_id); + book->priv->timeout_id = 0; + } + CORBA_exception_init (&ev); CORBA_Object_release (book->priv->listener, &ev); @@ -789,6 +798,7 @@ pas_book_destroy (GtkObject *object) CORBA_exception_free (&ev); g_free (book->priv); + book->priv = NULL; GTK_OBJECT_CLASS (pas_book_parent_class)->destroy (object); } |