]> git.saurik.com Git - wxWidgets.git/commitdiff
Don't crash in wxImage::SaveFile() if MIME type is not recognized.
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 20 Feb 2012 21:57:17 +0000 (21:57 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 20 Feb 2012 21:57:17 +0000 (21:57 +0000)
Insert a missing "return false" whose lack resulted in a crash if the handler
for the given MIME type wasn't found.

Closes #14028.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70656 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/image.cpp

index 62597542fd95dfaf2c759b93a8664c498486ccfd..ef7fb58dd9f5a96467d9b96315878263345709f8 100644 (file)
@@ -2576,6 +2576,7 @@ bool wxImage::SaveFile( wxOutputStream& stream, const wxString& mimetype ) const
     if ( !handler )
     {
         wxLogWarning( _("No image handler for type %s defined."), mimetype.GetData() );
+        return false;
     }
 
     return DoSave(*handler, stream);