From 882e0ca8cbc507cfba8dec1a340be9f5462069c3 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sun, 4 Jan 2015 19:23:43 +0100 Subject: FULLPIPE: Sanity check --- engines/fullpipe/statics.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'engines') diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp index 6b35159fd1..de3e1ea728 100644 --- a/engines/fullpipe/statics.cpp +++ b/engines/fullpipe/statics.cpp @@ -1597,6 +1597,12 @@ Movement::Movement(Movement *src, int *oldIdxs, int newSize, StaticANIObject *an newSize = src->_dynamicPhases.size(); } + if (!newSize) { + warning("Movement::Movement: newSize = 0"); + + return; + } + _framePosOffsets = (Common::Point **)calloc(newSize, sizeof(Common::Point *)); for (int i = 0; i < newSize; i++) -- cgit v1.2.3