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:
@@ -758,6 +758,12 @@ wxImage wxXPMDecoder::ReadData(const char **xpm_data)
|
|||||||
if ( entry == end )
|
if ( entry == end )
|
||||||
{
|
{
|
||||||
wxLogError(_("XPM: Malformed pixel data!"));
|
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
|
else
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user