From a554f8e3595152cd2afa33c6a2a368f6469509de Mon Sep 17 00:00:00 2001 From: Nickolay V. Shmyrev Date: Thu, 17 Aug 2006 07:20:47 +0000 Subject: More correct handling of document loading. Fixes bug #349043. 2006-08-17 Nickolay V. Shmyrev * backend/ev-document-factory.c: (ev_document_factory_get_document): * tiff/tiff-document.c: (tiff_document_finalize): More correct handling of document loading. Fixes bug #349043. --- (limited to 'tiff') diff --git a/tiff/tiff-document.c b/tiff/tiff-document.c index 9f465a7..4a532e1 100644 --- a/tiff/tiff-document.c +++ b/tiff/tiff-document.c @@ -274,8 +274,10 @@ tiff_document_finalize (GObject *object) { TiffDocument *tiff_document = TIFF_DOCUMENT (object); - TIFFClose (tiff_document->tiff); - g_free (tiff_document->uri); + if (tiff_document->tiff) + TIFFClose (tiff_document->tiff); + if (tiff_document->uri) + g_free (tiff_document->uri); G_OBJECT_CLASS (tiff_document_parent_class)->finalize (object); } -- cgit v0.9.1