aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-callbacks.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2002-01-09 10:16:50 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2002-01-09 10:16:50 +0800
commit1b28e0bb92410c64d230ea123163bdfe5f42e6e2 (patch)
tree0625189ab2514cdbd292105ac14c6093e16ffc1b /mail/mail-callbacks.c
parent956b6f95d0c975a54f3a9963b304e4d599667605 (diff)
downloadgsoc2013-evolution-1b28e0bb92410c64d230ea123163bdfe5f42e6e2.tar.gz
gsoc2013-evolution-1b28e0bb92410c64d230ea123163bdfe5f42e6e2.tar.zst
gsoc2013-evolution-1b28e0bb92410c64d230ea123163bdfe5f42e6e2.zip
Do proper refcounting on the draft folder.
2002-01-08 Jeffrey Stedfast <fejj@ximian.com> * mail-callbacks.c (composer_save_draft_cb): Do proper refcounting on the draft folder. svn path=/trunk/; revision=15268
Diffstat (limited to 'mail/mail-callbacks.c')
-rw-r--r--mail/mail-callbacks.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/mail/mail-callbacks.c b/mail/mail-callbacks.c
index 006363d9e8..9afcbc6334 100644
--- a/mail/mail-callbacks.c
+++ b/mail/mail-callbacks.c
@@ -661,8 +661,10 @@ use_default_drafts_cb (int reply, gpointer data)
extern CamelFolder *drafts_folder;
CamelFolder **folder = data;
- if (reply == 0)
+ if (reply == 0) {
*folder = drafts_folder;
+ camel_object_ref (CAMEL_OBJECT (*folder));
+ }
}
static void
@@ -705,8 +707,10 @@ composer_save_draft_cb (EMsgComposer *composer, int quit, gpointer data)
if (!folder)
return;
}
- } else
+ } else {
folder = drafts_folder;
+ camel_object_ref (CAMEL_OBJECT (folder));
+ }
msg = e_msg_composer_get_message_draft (composer);
@@ -719,6 +723,7 @@ composer_save_draft_cb (EMsgComposer *composer, int quit, gpointer data)
sdi->quit = quit;
mail_append_mail (folder, msg, info, save_draft_done, sdi);
+ camel_object_unref (CAMEL_OBJECT (folder));
camel_object_unref (CAMEL_OBJECT (msg));
}