[Scummvm-git-logs] scummvm master -> 10c2055faf4e4194cf004efa73700a8f64b4c550

sev- sev at scummvm.org
Wed Jun 10 23:00:13 UTC 2020


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:
10c2055faf DIRECTOR: LINGO: Do not crash during tests on 'set the stageColor'


Commit: 10c2055faf4e4194cf004efa73700a8f64b4c550
    https://github.com/scummvm/scummvm/commit/10c2055faf4e4194cf004efa73700a8f64b4c550
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-06-11T00:59:56+02:00

Commit Message:
DIRECTOR: LINGO: Do not crash during tests on 'set the stageColor'

Changed paths:
    engines/director/lingo/lingo-the.cpp


diff --git a/engines/director/lingo/lingo-the.cpp b/engines/director/lingo/lingo-the.cpp
index 390880c531..9a3daf4ab5 100644
--- a/engines/director/lingo/lingo-the.cpp
+++ b/engines/director/lingo/lingo-the.cpp
@@ -631,8 +631,12 @@ void Lingo::setTheEntity(int entity, Datum &id, int field, Datum &d) {
 	case kTheStageColor: {
 		Score *score = _vm->getCurrentScore();
 		score->_stageColor = d.asInt();
-		score->_surface->clear(score->_stageColor);
-		score->renderFrame(score->getCurrentFrame(), true);
+		if (score->_surface) {
+			score->_surface->clear(score->_stageColor);
+			score->renderFrame(score->getCurrentFrame(), true);
+		} else {
+			warning("setStageColor: score has no surface, skipping");
+		}
 	}
 		break;
 	case kTheSprite:




More information about the Scummvm-git-logs mailing list