]> www.fi.muni.cz Git - evince.git/blobdiff - backend/ev-document-factory.c
Port to GOption command line parsing. Fix for the bug #327518
[evince.git] / backend / ev-document-factory.c
index d31506db8b4fb64056c3be9b7184edcbe9bf447c..f8a3a4b8f7584496e144f464fa228c8c90d72d6e 100644 (file)
@@ -259,7 +259,7 @@ get_document_from_uri (const char *uri, gboolean slow, GError **error)
                gnome_vfs_file_info_unref (info);
                return NULL;
        }
-       
+
        document = ev_document_factory_get_from_mime (info->mime_type);
                
        if (document == NULL) {
@@ -280,7 +280,7 @@ EvDocument *
 ev_document_factory_get_document (const char *uri, GError **error)
 {
        EvDocument *document;
-       
+
        document = get_document_from_uri (uri, FALSE, error);
 
        if (*error == NULL) {
@@ -290,6 +290,8 @@ ev_document_factory_get_document (const char *uri, GError **error)
        if (*error) {
                g_error_free (*error);
                *error = NULL;
+       } else {
+               return document;
        }
 
        document = get_document_from_uri (uri, TRUE, error);