mirror of
https://github.com/scummvm/scummvm.git
synced 2026-06-20 05:45:29 +00:00
DIRECTOR: LINGO: Fix potential crash
This commit is contained in:
@@ -2645,11 +2645,12 @@ void LB::b_spriteBox(int nargs) {
|
||||
int spriteId = g_lingo->pop().asInt();
|
||||
Channel *channel = g_director->getCurrentMovie()->getScore()->getChannelById(spriteId);
|
||||
|
||||
channel->_sprite->_stretch = true;
|
||||
|
||||
if (!channel)
|
||||
return;
|
||||
|
||||
// This automatically sets the sctretch mode
|
||||
channel->_sprite->_stretch = true;
|
||||
|
||||
g_director->getCurrentWindow()->addDirtyRect(channel->getBbox());
|
||||
channel->setBbox(l, t, r, b);
|
||||
channel->_dirty = true;
|
||||
|
||||
Reference in New Issue
Block a user