X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;f=thumbnailer%2Fevince-thumbnailer.c;h=1c0ba0b4e1aa95bb823ceb8ef0f0437abfc9a934;hb=1a9964cbdc190840aa6ea2d762be1b8132d3dcbb;hp=8c79ae92db73228760a904a9e19c61efd1ce86b6;hpb=67a923a1096f1e9765a5d804e4fb9fac39bcfcf2;p=evince.git diff --git a/thumbnailer/evince-thumbnailer.c b/thumbnailer/evince-thumbnailer.c index 8c79ae92..1c0ba0b4 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;