From 8192fcf9d923bbe2d695875cda297be7b8f7a9e4 Mon Sep 17 00:00:00 2001 From: Chris Apers Date: Fri, 2 Sep 2005 11:47:47 +0000 Subject: Fixed potential memory error on system that can't return a pointer of 0 byte svn-id: r18735 --- saga/actor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/saga/actor.cpp b/saga/actor.cpp index f60c4cc293..416f3d1aa6 100644 --- a/saga/actor.cpp +++ b/saga/actor.cpp @@ -318,7 +318,7 @@ bool Actor::loadActorResources(ActorData *actor) { debug(9, "Frame resource contains %d frames (res length is %d)", framesCount, resourceLength); framesPointer = (ActorFrameSequence *)malloc(sizeof(ActorFrameSequence) * framesCount); - if (framesPointer == NULL) { + if (framesPointer == NULL && framesCount != 0) { memoryError("Actor::loadActorResources"); } -- cgit v1.2.3