[Scummvm-git-logs] scummvm master -> 21f28bc8e62f80b87698aa204c8705feec683669

moralrecordings code at moral.net.au
Wed Jun 10 14:10:29 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:
21f28bc8e6 DIRECTOR: Fix Sprite::getBbox() to check for null widget


Commit: 21f28bc8e62f80b87698aa204c8705feec683669
    https://github.com/scummvm/scummvm/commit/21f28bc8e62f80b87698aa204c8705feec683669
Author: Scott Percival (code at moral.net.au)
Date: 2020-06-10T22:10:16+08:00

Commit Message:
DIRECTOR: Fix Sprite::getBbox() to check for null widget

Changed paths:
    engines/director/sprite.cpp


diff --git a/engines/director/sprite.cpp b/engines/director/sprite.cpp
index 6ff186520a..b5889bf3b4 100644
--- a/engines/director/sprite.cpp
+++ b/engines/director/sprite.cpp
@@ -254,7 +254,7 @@ Common::Rect Sprite::getBbox() {
 		// WORKAROUND: Shape widgets not fully implemented.
 		result = Common::Rect(_currentPoint.x, _currentPoint.y, _currentPoint.x + _width, _currentPoint.y + _height);
 	} else {
-		result = _cast ? _cast->_widget->getDimensions() : Common::Rect(0, 0, _width, _height);
+		result = _cast && _cast->_widget ? _cast->_widget->getDimensions() : Common::Rect(0, 0, _width, _height);
 	}
 
 	result.moveTo(_currentPoint.x, _currentPoint.y);




More information about the Scummvm-git-logs mailing list