aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/cal-client/cal-client.c
diff options
context:
space:
mode:
Diffstat (limited to 'calendar/cal-client/cal-client.c')
-rw-r--r--calendar/cal-client/cal-client.c22
1 files changed, 6 insertions, 16 deletions
diff --git a/calendar/cal-client/cal-client.c b/calendar/cal-client/cal-client.c
index 41e42613bb..f0519057d6 100644
--- a/calendar/cal-client/cal-client.c
+++ b/calendar/cal-client/cal-client.c
@@ -260,21 +260,6 @@ destroy_factory (CalClient *client)
priv->factory = CORBA_OBJECT_NIL;
}
-/* Gets rid of the listener that a client knows about */
-static void
-destroy_listener (CalClient *client)
-{
- CalClientPrivate *priv;
-
- priv = client->priv;
-
- if (!priv->listener)
- return;
-
- bonobo_object_unref (BONOBO_OBJECT (priv->listener));
- priv->listener = NULL;
-}
-
/* Gets rid of the calendar client interface object that a client knows about */
static void
destroy_cal (CalClient *client)
@@ -337,9 +322,14 @@ cal_client_destroy (GtkObject *object)
client = CAL_CLIENT (object);
priv = client->priv;
+ /* The server unrefs the query listener, so we just NULL it out here */
+ if (priv->listener) {
+ cal_listener_stop_notification (priv->listener);
+ priv->listener = NULL;
+ }
+
destroy_wombat_client (client);
destroy_factory (client);
- destroy_listener (client);
destroy_cal (client);
priv->load_state = CAL_CLIENT_LOAD_NOT_LOADED;