aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2000-04-25 03:29:20 +0800
committerDan Winship <danw@src.gnome.org>2000-04-25 03:29:20 +0800
commit98e2091d6287bd28601d49877f1169de1c0dad6c (patch)
tree7f5bf3a6c21069fcf1542bd5d3c5637596e1219b /camel/providers
parent262f167d2e8da08fa15ab9099f1aec6209915e56 (diff)
downloadgsoc2013-evolution-98e2091d6287bd28601d49877f1169de1c0dad6c.tar
gsoc2013-evolution-98e2091d6287bd28601d49877f1169de1c0dad6c.tar.gz
gsoc2013-evolution-98e2091d6287bd28601d49877f1169de1c0dad6c.tar.bz2
gsoc2013-evolution-98e2091d6287bd28601d49877f1169de1c0dad6c.tar.lz
gsoc2013-evolution-98e2091d6287bd28601d49877f1169de1c0dad6c.tar.xz
gsoc2013-evolution-98e2091d6287bd28601d49877f1169de1c0dad6c.tar.zst
gsoc2013-evolution-98e2091d6287bd28601d49877f1169de1c0dad6c.zip
ref (and sink) the message stream if we're going to unref it later.
* providers/mbox/camel-mbox-folder.c (_get_message_by_uid): ref (and sink) the message stream if we're going to unref it later. Otherwise it could get destroyed while there are still substreams attached to it. This needs a cleaner solution. svn path=/trunk/; revision=2586
Diffstat (limited to 'camel/providers')
-rw-r--r--camel/providers/mbox/camel-mbox-folder.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/camel/providers/mbox/camel-mbox-folder.c b/camel/providers/mbox/camel-mbox-folder.c
index a22c273c2d..be02a472c6 100644
--- a/camel/providers/mbox/camel-mbox-folder.c
+++ b/camel/providers/mbox/camel-mbox-folder.c
@@ -855,6 +855,8 @@ _get_message_by_uid (CamelFolder *folder, const gchar *uid, CamelException *ex)
CAMEL_STREAM_FS_READ,
((CamelMboxMessageContentInfo *)info->info.content)->pos,
((CamelMboxMessageContentInfo *)info->info.content)->endpos);
+ gtk_object_ref((GtkObject *)message_stream);
+ gtk_object_sink((GtkObject *)message_stream);
message = camel_mime_message_new();
camel_data_wrapper_construct_from_stream((CamelDataWrapper *)message, message_stream);
gtk_object_unref((GtkObject *)message_stream);