From d37177eb94fcdd9bdaac6aa664d96a01ad9372db Mon Sep 17 00:00:00 2001 From: Christian Persch Date: Sun, 15 Feb 2009 13:52:56 +0000 Subject: Make sure to always set @error when returning FALSE. * backend/tiff/tiff-document.c: (tiff_document_load): Make sure to always set @error when returning FALSE. svn path=/trunk/; revision=3453 --- (limited to 'backend/tiff') diff --git a/backend/tiff/tiff-document.c b/backend/tiff/tiff-document.c index 6969a1b..5501451 100644 --- a/backend/tiff/tiff-document.c +++ b/backend/tiff/tiff-document.c @@ -91,13 +91,11 @@ tiff_document_load (EvDocument *document, gchar *filename; TIFF *tiff; - push_handlers (); filename = g_filename_from_uri (uri, NULL, error); - if (!filename) { - pop_handlers (); + if (!filename) return FALSE; - } + push_handlers (); tiff = TIFFOpen (filename, "r"); if (tiff) { guint32 w, h; @@ -109,6 +107,13 @@ tiff_document_load (EvDocument *document, if (!tiff) { pop_handlers (); + + g_set_error_literal (error, + EV_DOCUMENT_ERROR, + EV_DOCUMENT_ERROR_INVALID, + _("Invalid document")); + + g_free (filename); return FALSE; } -- cgit v0.9.1