[Scummvm-git-logs] scummvm master -> 979bf50cf1c62c66adeed5b719e8c40e471754b0
sev-
sev at scummvm.org
Thu May 7 18:42:30 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:
979bf50cf1 DIRECTOR: return early where textCast is null
Commit: 979bf50cf1c62c66adeed5b719e8c40e471754b0
https://github.com/scummvm/scummvm/commit/979bf50cf1c62c66adeed5b719e8c40e471754b0
Author: Roland van Laar (roland at rolandvanlaar.nl)
Date: 2020-05-07T20:42:25+02:00
Commit Message:
DIRECTOR: return early where textCast is null
Fixes a segfault for the rectangle not being valid and
resolves multiple test crashes in the buildbot.
Changed paths:
engines/director/frame.cpp
diff --git a/engines/director/frame.cpp b/engines/director/frame.cpp
index da26988325..31a9d1a6b5 100644
--- a/engines/director/frame.cpp
+++ b/engines/director/frame.cpp
@@ -857,6 +857,11 @@ void Frame::renderButton(Graphics::ManagedSurface &surface, uint16 spriteId) {
void Frame::renderText(Graphics::ManagedSurface &surface, uint16 spriteId, Common::Rect *textRect) {
TextCast *textCast = (TextCast*)_sprites[spriteId]->_cast;
+ if (textCast == nullptr){
+ warning("Frame::renderText(): TextCast: %d is a nullptr", spriteId);
+ return;
+ }
+
Score *score = _vm->getCurrentScore();
Sprite *sprite = _sprites[spriteId];
More information about the Scummvm-git-logs
mailing list