2008-07-20 Carlos Garcia Campos <carlosgc@gnome.org>
* libdocument/ev-document-factory.c: (get_mime_type_from_data),
(get_document_from_uri):
Make sure we always return a valid error struct when
get_document_from_uri fails. Fixes nautilus crash, see bug
#542548.
svn path=/trunk/; revision=3076
+2008-07-20 Carlos Garcia Campos <carlosgc@gnome.org>
+
+ * libdocument/ev-document-factory.c: (get_mime_type_from_data),
+ (get_document_from_uri):
+
+ Make sure we always return a valid error struct when
+ get_document_from_uri fails. Fixes nautilus crash, see bug
+ #542548.
+
2008-07-15 Darren Kenny <darren.kenny@sun.com>
* libdocument/ev-transition-effect.c
size_read = g_input_stream_read (G_INPUT_STREAM (input_stream),
buffer, 1024, NULL, NULL);
- g_input_stream_close (G_INPUT_STREAM (input_stream), NULL, NULL);
+ g_input_stream_close (G_INPUT_STREAM (input_stream), NULL, error);
g_object_unref (file);
if (mime_type == NULL) {
g_free (mime_type);
+
+ if (*error == NULL) {
+ g_set_error (error,
+ EV_DOCUMENT_ERROR,
+ 0,
+ _("Unknown MIME Type"));
+ }
return NULL;
}