aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--camel/ChangeLog5
-rw-r--r--camel/providers/mbox/camel-mbox-folder.c2
2 files changed, 7 insertions, 0 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index 3ee2d0c0ae..ccca37a671 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,5 +1,10 @@
2000-04-24 Dan Winship <danw@helixcode.com>
+ * 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.
+
* camel.h: remove data-wrapper-repository.h include(s)
2000-04-24 NotZed <NotZed@HelixCode.com>
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);