Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/backend
diff options
context:
space:
mode:
authorCarlos Garcia Campos <carlosgc@gnome.org>2006-04-06 14:54:00 (GMT)
committer Carlos Garcia Campos <carlosgc@src.gnome.org>2006-04-06 14:54:00 (GMT)
commit48386837a0899cc7189e4194892ca94cb8b6e89a (patch)
tree151c7221e61ce73123c88a0a2ae8c8017742a272 /backend
parentdf2e56885d32baa7ceaad348e304b6ecf0ceed64 (diff)
Do not load the document twice when there isn't errors
2006-04-06 Carlos Garcia Campos <carlosgc@gnome.org> * backend/ev-document-factory.c: Do not load the document twice when there isn't errors
Diffstat (limited to 'backend')
-rw-r--r--backend/ev-document-factory.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/backend/ev-document-factory.c b/backend/ev-document-factory.c
index d31506d..f8a3a4b 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,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);