X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b931f7ee94f9168cc95f2c360647c172cc169adb..0d1cb8cb298ae68754575cb65695ff9567a36899:/src/common/imaggif.cpp diff --git a/src/common/imaggif.cpp b/src/common/imaggif.cpp index b2a1cdf793..1aed9a28cb 100644 --- a/src/common/imaggif.cpp +++ b/src/common/imaggif.cpp @@ -116,14 +116,8 @@ bool wxGIFHandler::SaveFile( wxImage * WXUNUSED(image), bool wxGIFHandler::DoCanRead( wxInputStream& stream ) { - wxGIFDecoder *decod; - bool ok; - - decod = new wxGIFDecoder(&stream); - ok = decod->CanRead(); - delete decod; - - return ok; + wxGIFDecoder decod(&stream); + return decod.CanRead(); } #endif // wxUSE_STREAMS