diff options
Diffstat (limited to 'addressbook/backend/pas/pas-book.c')
-rw-r--r-- | addressbook/backend/pas/pas-book.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/addressbook/backend/pas/pas-book.c b/addressbook/backend/pas/pas-book.c index d6e9ff55ac..2601d3d9d0 100644 --- a/addressbook/backend/pas/pas-book.c +++ b/addressbook/backend/pas/pas-book.c @@ -487,6 +487,14 @@ pas_book_construct (PASBook *book, bonobo_object_construct (BONOBO_OBJECT (book), obj); + CORBA_exception_init (&ev); + book->priv->listener = CORBA_Object_duplicate (listener, &ev); + + if (ev._major != CORBA_NO_EXCEPTION) + g_message ("pas_book_construct(): could not duplicate the listener"); + + CORBA_exception_free (&ev); + book->priv->listener = listener; book->priv->get_vcard = get_vcard; book->priv->backend = backend; @@ -523,6 +531,7 @@ pas_book_destroy (GtkObject *object) { PASBook *book = PAS_BOOK (object); GList *l; + CORBA_Environment ev; for (l = book->priv->request_queue; l != NULL; l = l->next) { PASRequest *req = l->data; @@ -533,6 +542,14 @@ pas_book_destroy (GtkObject *object) } g_list_free (book->priv->request_queue); + CORBA_exception_init (&ev); + CORBA_Object_release (book->priv->listener, &ev); + + if (ev._major != CORBA_NO_EXCEPTION) + g_message ("pas_book_construct(): could not release the listener"); + + CORBA_exception_free (&ev); + g_free (book->priv); GTK_OBJECT_CLASS (pas_book_parent_class)->destroy (object); |