[Scummvm-git-logs] scummvm master -> 26f17006eb4794eb9b802d455a8c22387e1481a9

sev- noreply at scummvm.org
Tue May 21 21:50:01 UTC 2024


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:
26f17006eb DIRECTOR: DEBUGGER: Fix crash in Score window when switching to a smaller movie


Commit: 26f17006eb4794eb9b802d455a8c22387e1481a9
    https://github.com/scummvm/scummvm/commit/26f17006eb4794eb9b802d455a8c22387e1481a9
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2024-05-21T23:49:14+02:00

Commit Message:
DIRECTOR: DEBUGGER: Fix crash in Score window when switching to a smaller movie

Changed paths:
    engines/director/debugtools.cpp


diff --git a/engines/director/debugtools.cpp b/engines/director/debugtools.cpp
index ea38b897b1a..87b0b26af2f 100644
--- a/engines/director/debugtools.cpp
+++ b/engines/director/debugtools.cpp
@@ -1871,6 +1871,12 @@ static void showScore() {
 			return;
 		}
 
+		if (_state->_selectedScoreCast.frame >= numFrames)
+			_state->_selectedScoreCast.frame = 0;
+
+		if (!numFrames || _state->_selectedScoreCast.channel >= score->_scoreCache[0]->_sprites.size())
+			_state->_selectedScoreCast.channel = 0;
+
 		{ // Render sprite details
 			Sprite *sprite = nullptr;
 			CastMember *castMember = nullptr;




More information about the Scummvm-git-logs mailing list