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

npjg nathanael.gentrydb8 at gmail.com
Wed Jun 17 13:22:27 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:
d879feb237 DIRECTOR: LINGO: Don't try to read null channel


Commit: d879feb237dbde62008af30d81a6b8b97a5fa7ee
    https://github.com/scummvm/scummvm/commit/d879feb237dbde62008af30d81a6b8b97a5fa7ee
Author: Nathanael Gentry (nathanael.gentrydb8 at gmail.com)
Date: 2020-06-17T09:21:54-04:00

Commit Message:
DIRECTOR: LINGO: Don't try to read null channel

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 29f3544eaa..c8f262808a 100644
--- a/engines/director/lingo/lingo-the.cpp
+++ b/engines/director/lingo/lingo-the.cpp
@@ -689,8 +689,10 @@ Datum Lingo::getTheSprite(Datum &id1, int field) {
 	}
 
 	Channel *channel = score->getChannelById(id);
-	Sprite *sprite = channel->_sprite;
+	if (!channel)
+		return d;
 
+	Sprite *sprite = channel->_sprite;
 	if (!sprite)
 		return d;
 
@@ -810,8 +812,10 @@ void Lingo::setTheSprite(Datum &id1, int field, Datum &d) {
 	}
 
 	Channel *channel = score->getChannelById(id);
-	Sprite *sprite = channel->_sprite;
+	if (!channel)
+		return;
 
+	Sprite *sprite = channel->_sprite;
 	if (!sprite)
 		return;
 




More information about the Scummvm-git-logs mailing list