aboutsummaryrefslogtreecommitdiffstats
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
parent956b6f95d0c975a54f3a9963b304e4d599667605 (diff)
downloadgsoc2013-evolution-1b28e0bb92410c64d230ea123163bdfe5f42e6e2.tar
gsoc2013-evolution-1b28e0bb92410c64d230ea123163bdfe5f42e6e2.tar.gz
gsoc2013-evolution-1b28e0bb92410c64d230ea123163bdfe5f42e6e2.tar.bz2
gsoc2013-evolution-1b28e0bb92410c64d230ea123163bdfe5f42e6e2.tar.lz
gsoc2013-evolution-1b28e0bb92410c64d230ea123163bdfe5f42e6e2.tar.xz
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
-rw-r--r--mail/ChangeLog3
-rw-r--r--mail/mail-callbacks.c9
2 files changed, 10 insertions, 2 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 65af5a57ab..109ccb68b8 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,5 +1,8 @@
2002-01-08 Jeffrey Stedfast <fejj@ximian.com>
+ * mail-callbacks.c (composer_save_draft_cb): Do proper refcounting
+ on the draft folder.
+
* message-list.c (message_list_select): When performing a
wraparound, check to see if the first (or last depending on
direction) message fits the selection criteria before telling
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));
}