[Scummvm-git-logs] scummvm master -> 016bb1daf90f6feef7c2cd53f78b5bcdfbf8a7d2

sev- noreply at scummvm.org
Thu Jul 9 20:45:17 UTC 2026


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .

Summary:
016bb1daf9 DIRECTOR: Do not attmept to delete cast for Filmloop cast members


Commit: 016bb1daf90f6feef7c2cd53f78b5bcdfbf8a7d2
    https://github.com/scummvm/scummvm/commit/016bb1daf90f6feef7c2cd53f78b5bcdfbf8a7d2
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2026-07-09T22:45:07+02:00

Commit Message:
DIRECTOR: Do not attmept to delete cast for Filmloop cast members

Since they just reuse cast from the main movie, attempts to do it
leads to use-after-free.

We distinguish Filmloops's cast with Score as nullptr passed in the
FilmloopCastMember constructor.

Fixes crash during movie switchinng in gusolis and number of other
titles that use filmloops.

Changed paths:
    engines/director/channel.cpp


diff --git a/engines/director/channel.cpp b/engines/director/channel.cpp
index 0ce8593cf34..e75efbe4274 100644
--- a/engines/director/channel.cpp
+++ b/engines/director/channel.cpp
@@ -109,7 +109,7 @@ Channel& Channel::operator=(const Channel &channel) {
 
 Channel::~Channel() {
 	// A digital video cast member can outlive this channel.
-	if (_sprite && _sprite->_cast && _sprite->_cast->_type == kCastDigitalVideo) {
+	if (_score && _sprite && _sprite->_cast && _sprite->_cast->_type == kCastDigitalVideo) {
 		DigitalVideoCastMember *video = (DigitalVideoCastMember *)_sprite->_cast;
 		if (video->_channel == this) {
 			video->setChannel(nullptr);




More information about the Scummvm-git-logs mailing list