From: Peter Csaszar Date: Fri, 3 Aug 2007 10:09:40 +0000 (+0000) Subject: An ref/unref problem resolved, but there might be another one. X-Git-Tag: git_migration_finished~2639 X-Git-Url: http://git.maemo.org/git/?p=modest;a=commitdiff_plain;h=2d3b744a01e697f76025b5de43e5d001719209f1 An ref/unref problem resolved, but there might be another one. pmo-trunk-r2921 --- 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); }