X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;f=properties%2Fev-properties-main.c;h=2e566d5505763b5397f4641f27f95162088434b5;hb=48ab804ceec8229e351914ec863202418938d5fa;hp=64f5707bf6fc22ca09044a2c271427e05c08dce6;hpb=ffd47fa767f69c0b534037a6e067534d7d2345c9;p=evince.git diff --git a/properties/ev-properties-main.c b/properties/ev-properties-main.c index 64f5707b..2e566d55 100644 --- a/properties/ev-properties-main.c +++ b/properties/ev-properties-main.c @@ -82,7 +82,7 @@ static GList * ev_properties_get_pages (NautilusPropertyPageProvider *provider, GList *files) { - GError *error; + GError *error = NULL; char *mime; EvDocument *document; GList *pages = NULL; @@ -96,15 +96,19 @@ ev_properties_get_pages (NautilusPropertyPageProvider *provider, goto end; file = files->data; - /* okay, make the page */ mime = nautilus_file_info_get_mime_type (file); document = ev_document_factory_get_document (mime); g_free (mime); + if (document == NULL) + goto end; + uri = nautilus_file_info_get_uri (file); if (!ev_document_load (document, uri, &error)) { - g_error_free (error); + if (error) { + g_error_free (error); + } goto end; } label = gtk_label_new (_("Document"));