aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
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