diff options
Diffstat (limited to 'thumbnailer')
-rw-r--r-- | thumbnailer/evince-thumbnailer.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/thumbnailer/evince-thumbnailer.c b/thumbnailer/evince-thumbnailer.c index 8c79ae9..1c0ba0b 100644 --- a/thumbnailer/evince-thumbnailer.c +++ b/thumbnailer/evince-thumbnailer.c @@ -36,22 +36,23 @@ evince_thumbnail_pngenc_get (const char *uri, const char *thumbnail, int size) EvDocument *document = NULL; GError *error = NULL; GdkPixbuf *pixbuf; - char *mime_type = NULL; - document = ev_document_factory_get_document (uri, &mime_type, &error); + document = ev_document_factory_get_document (uri, &error); - if (document == NULL || error) { - return FALSE; - } - - if (!ev_document_load (document, uri, &error)) { + if (error) { if (error->domain == EV_DOCUMENT_ERROR && - error->code == EV_DOCUMENT_ERROR_ENCRYPTED) { + error->code == EV_DOCUMENT_ERROR_ENCRYPTED) { /* FIXME: Create a thumb for cryp docs */ + g_error_free (error); + return FALSE; } g_error_free (error); return FALSE; } + + if (document == NULL) { + return FALSE; + } if (!EV_IS_DOCUMENT_THUMBNAILS (document)) { return FALSE; |