X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0be9ace27e0a278272cbb1e9daa988b65898eca1..dad6a47e6d425673510b53e9a01114cdea2a5f2c:/src/common/xpmdecod.cpp diff --git a/src/common/xpmdecod.cpp b/src/common/xpmdecod.cpp index 4b4e47e045..c6e10441c9 100644 --- a/src/common/xpmdecod.cpp +++ b/src/common/xpmdecod.cpp @@ -90,7 +90,7 @@ license is as follows: * in this Software without prior written authorization from GROUPE BULL. */ -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "xpmdecod.h" #endif @@ -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 {