aboutsummaryrefslogtreecommitdiff
path: root/saga
diff options
context:
space:
mode:
authorChris Apers2005-09-02 11:47:47 +0000
committerChris Apers2005-09-02 11:47:47 +0000
commit8192fcf9d923bbe2d695875cda297be7b8f7a9e4 (patch)
tree6889babf3d33e1bb89078bfa00b3a8241d0302c0 /saga
parent14ac8d9d215dc3edbb4ca2084787a9281da355fd (diff)
downloadscummvm-rg350-8192fcf9d923bbe2d695875cda297be7b8f7a9e4.tar.gz
scummvm-rg350-8192fcf9d923bbe2d695875cda297be7b8f7a9e4.tar.bz2
scummvm-rg350-8192fcf9d923bbe2d695875cda297be7b8f7a9e4.zip
Fixed potential memory error on system that can't return a pointer of 0 byte
svn-id: r18735
Diffstat (limited to 'saga')
-rw-r--r--saga/actor.cpp2
1 files changed, 1 insertions, 1 deletions
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");
}