evince r3076 - in trunk: . libdocument
- From: carlosgc svn gnome org
- To: svn-commits-list gnome org
- Subject: evince r3076 - in trunk: . libdocument
- Date: Sun, 20 Jul 2008 11:27:20 +0000 (UTC)
Author: carlosgc
Date: Sun Jul 20 11:27:20 2008
New Revision: 3076
URL: http://svn.gnome.org/viewvc/evince?rev=3076&view=rev
Log:
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.
Modified:
trunk/ChangeLog
trunk/libdocument/ev-document-factory.c
Modified: trunk/libdocument/ev-document-factory.c
==============================================================================
--- trunk/libdocument/ev-document-factory.c (original)
+++ trunk/libdocument/ev-document-factory.c Sun Jul 20 11:27:20 2008
@@ -143,7 +143,7 @@
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);
@@ -172,6 +172,13 @@
if (mime_type == NULL) {
g_free (mime_type);
+
+ if (*error == NULL) {
+ g_set_error (error,
+ EV_DOCUMENT_ERROR,
+ 0,
+ _("Unknown MIME Type"));
+ }
return NULL;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]