aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorEugene Sandulenko2011-04-17 14:48:27 +0300
committerEugene Sandulenko2011-04-17 15:25:06 +0300
commitce0cc0ee857740cb0bd1ebd3b4bfa6eefc31aee6 (patch)
tree3d4694ec262c99c9b9f3b2dfc00205b323a18ded /common
parenta383fe452f5b62a74fc92b8734425bd8ab793402 (diff)
downloadscummvm-rg350-ce0cc0ee857740cb0bd1ebd3b4bfa6eefc31aee6.tar.gz
scummvm-rg350-ce0cc0ee857740cb0bd1ebd3b4bfa6eefc31aee6.tar.bz2
scummvm-rg350-ce0cc0ee857740cb0bd1ebd3b4bfa6eefc31aee6.zip
COMMON: Partial fix for #3087922: COMMON/BASE/BACKENDS: Code analysis warnings
Diffstat (limited to 'common')
-rw-r--r--common/macresman.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/common/macresman.cpp b/common/macresman.cpp
index e7d4a30789..b06d986ca2 100644
--- a/common/macresman.cpp
+++ b/common/macresman.cpp
@@ -623,6 +623,11 @@ void MacResManager::convertCrsrCursor(SeekableReadStream *data, byte **cursor, i
// Pixel data for cursor
int iconDataSize = iconRowBytes * (iconBounds[3] - iconBounds[1]);
byte *iconData = new byte[iconDataSize];
+
+ if (!iconData) {
+ error("Cannot allocate iconData in macresman.cpp");
+ }
+
data->read(iconData, iconDataSize);
// Color table