]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/xpmdecod.cpp
added support for range types to runtime depersister
[wxWidgets.git] / src / common / xpmdecod.cpp
index 35e9b0b521563b2cc96b9c38f808a7c4871e8071..c6e10441c9e209eff003645acd821ae35d435a4f 100644 (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
             {