Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/backend
diff options
context:
space:
mode:
Diffstat (limited to 'backend')
-rw-r--r--backend/ev-document-factory.c24
1 files changed, 11 insertions, 13 deletions
diff --git a/backend/ev-document-factory.c b/backend/ev-document-factory.c
index 3b3f701..a2ea526 100644
--- a/backend/ev-document-factory.c
+++ b/backend/ev-document-factory.c
@@ -291,21 +291,19 @@ ev_document_factory_get_document (const char *uri, GError **error)
document = get_document_from_uri (uri, FALSE, error);
- if (*error != NULL) {
- return NULL;
- }
-
- result = ev_document_load (document, uri, error);
-
- if (result == FALSE || *error) {
- if (*error &&
- (*error)->domain == EV_DOCUMENT_ERROR &&
- (*error)->code == EV_DOCUMENT_ERROR_ENCRYPTED)
+ if (*error == NULL) {
+ result = ev_document_load (document, uri, error);
+
+ if (result == FALSE || *error) {
+ if (*error &&
+ (*error)->domain == EV_DOCUMENT_ERROR &&
+ (*error)->code == EV_DOCUMENT_ERROR_ENCRYPTED)
+ return document;
+ } else {
return document;
- } else {
- return document;
+ }
}
-
+
/* Try again with slow mime detection */
if (document)
g_object_unref (document);