From 0141d2c9bd1033b773847447029f4598b7d9e90e Mon Sep 17 00:00:00 2001 From: Guillermo Rodriguez Garcia Date: Tue, 29 Feb 2000 20:58:36 +0000 Subject: [PATCH] moved Destroy() to the beginning git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6360 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/imaggif.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/common/imaggif.cpp b/src/common/imaggif.cpp index 74e573df34..717e967390 100644 --- a/src/common/imaggif.cpp +++ b/src/common/imaggif.cpp @@ -44,6 +44,7 @@ bool wxGIFHandler::LoadFile( wxImage *image, wxInputStream& stream, bool verbose int error; bool ok; +// image->Destroy(); decod = new wxGIFDecoder(&stream, TRUE); error = decod->ReadGIF(); @@ -70,14 +71,13 @@ bool wxGIFHandler::LoadFile( wxImage *image, wxInputStream& stream, bool verbose if ((error == wxGIF_TRUNCATED) && verbose) { - wxLogWarning(_("wxGIFHandler: data stream seems to be truncated.")); + wxLogError(_("wxGIFHandler: data stream seems to be truncated.")); /* go on; image data is OK */ } - image->Destroy(); ok = decod->ConvertToImage(image); - delete decod; + return ok; } @@ -97,8 +97,8 @@ bool wxGIFHandler::DoCanRead( wxInputStream& stream ) decod = new wxGIFDecoder(&stream); ok = decod->CanRead(); - delete decod; + return ok; } -- 2.45.2