DIRECTOR: Fix segfault

This commit is contained in:
djsrv 2020-07-21 16:21:56 -04:00
parent 6b404187fc
commit 2a310ee7e7

View File

@ -155,7 +155,7 @@ bool Channel::isMouseIn(const Common::Point &pos, bool onlyMatte) {
return false;
if (onlyMatte) {
if (_sprite->_cast->_type == kCastBitmap) {
if (_sprite->_cast && _sprite->_cast->_type == kCastBitmap) {
Graphics::Surface *matte = ((BitmapCastMember *)_sprite->_cast)->getMatte();
return matte ? !(*(byte *)(matte->getBasePtr(pos.x - bbox.left, pos.y - bbox.top))) : true;
}