[Scummvm-git-logs] scummvm master -> e5144e9590087eac0ebd6604e9b44f6ee804b89d

bluegr bluegr at gmail.com
Sat Jul 20 07:06:53 CEST 2019


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
e5144e9590 COMPOSER: Don't crash when skipping invalid animations


Commit: e5144e9590087eac0ebd6604e9b44f6ee804b89d
    https://github.com/scummvm/scummvm/commit/e5144e9590087eac0ebd6604e9b44f6ee804b89d
Author: angstsmurf (ignalina at me.com)
Date: 2019-07-20T08:06:49+03:00

Commit Message:
COMPOSER: Don't crash when skipping invalid animations

Don't try to run a NULL animation. Fixes a crash in Gregory.

Changed paths:
    engines/composer/graphics.cpp


diff --git a/engines/composer/graphics.cpp b/engines/composer/graphics.cpp
index b95a6bc..aa7ed7c 100644
--- a/engines/composer/graphics.cpp
+++ b/engines/composer/graphics.cpp
@@ -151,8 +151,10 @@ void ComposerEngine::playAnimation(uint16 animId, int16 x, int16 y, int16 eventP
 
 	Animation *anim = NULL;
 	loadAnimation(anim, animId, x, y, eventParam);
-	_anims.push_back(anim);
-	runEvent(kEventAnimStarted, animId, eventParam, 0);
+	if (anim != NULL) {
+		_anims.push_back(anim);
+		runEvent(kEventAnimStarted, animId, eventParam, 0);
+	}
 }
 
 void ComposerEngine::stopAnimation(Animation *anim, bool localOnly, bool pipesOnly) {





More information about the Scummvm-git-logs mailing list