return immediately if the XPM is bad instead of spitting out thousands of error messages

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23002 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2003-08-18 23:55:17 +00:00
parent 17f8d2a701
commit 3ffb81a423

View File

@ -758,6 +758,12 @@ wxImage wxXPMDecoder::ReadData(const char **xpm_data)
if ( entry == end )
{
wxLogError(_("XPM: Malformed pixel data!"));
// better return right now as otherwise we risk to flood the
// user with error messages as something seems to be seriously
// wrong with the file and so we could give this message for
// each remaining pixel if we don't bail out
return wxNullImage;
}
else
{