X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;f=backend%2Fev-document-factory.c;h=f8a3a4b8f7584496e144f464fa228c8c90d72d6e;hb=4a45e9810135419fe71ef27361e2a7b3b69a1f35;hp=c02801fbc1aff16c2eec45b74afd082a61309711;hpb=a4a3a2301361cb6a71e1b127e8e43589f2749105;p=evince.git diff --git a/backend/ev-document-factory.c b/backend/ev-document-factory.c index c02801fb..f8a3a4b8 100644 --- a/backend/ev-document-factory.c +++ b/backend/ev-document-factory.c @@ -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,18 +280,18 @@ EvDocument * ev_document_factory_get_document (const char *uri, GError **error) { EvDocument *document; - + document = get_document_from_uri (uri, FALSE, error); - if (*error != NULL) { - return NULL; + if (*error == NULL) { + ev_document_load (document, uri, error); } - - ev_document_load (document, uri, error); - + if (*error) { g_error_free (*error); *error = NULL; + } else { + return document; } document = get_document_from_uri (uri, TRUE, error);