From 2d3b744a01e697f76025b5de43e5d001719209f1 Mon Sep 17 00:00:00 2001 From: Peter Csaszar Date: Fri, 3 Aug 2007 10:09:40 +0000 Subject: [PATCH] An ref/unref problem resolved, but there might be another one. pmo-trunk-r2921 --- src/modest-mail-operation.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/modest-mail-operation.c b/src/modest-mail-operation.c index 0589964..bcc5ef4 100644 --- a/src/modest-mail-operation.c +++ b/src/modest-mail-operation.c @@ -2578,6 +2578,7 @@ on_refresh_folder (TnyFolder *folder, /* Notify about operation end */ modest_mail_operation_notify_end (self); + g_object_unref(self); } static void @@ -2632,7 +2633,7 @@ modest_mail_operation_refresh_folder (ModestMailOperation *self, /* Create the helper */ helper = g_slice_new0 (RefreshAsyncHelper); - helper->mail_op = self; + helper->mail_op = g_object_ref(self); helper->user_callback = user_callback; helper->user_data = user_data; @@ -2675,6 +2676,9 @@ modest_mail_operation_notify_end (ModestMailOperation *self) /* We do not wrapp this emission because we assume that this function is always called from within the main lock */ state = modest_mail_operation_clone_state (self); + g_warning ("EXAMINE SITUATION: " + "self might be NULL after this function (%s) returns", + __FUNCTION__); g_signal_emit (G_OBJECT (self), signals[PROGRESS_CHANGED_SIGNAL], 0, state, NULL); g_slice_free (ModestMailOperationState, state); } -- 1.7.9.5