[Scummvm-git-logs] scummvm master -> 80d72644372c1095b21d98732dae5e499b21205c

bluegr noreply at scummvm.org
Tue Aug 18 18:54:53 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:
80d7264437 MADE: Unload music data when stopping playback


Commit: 80d72644372c1095b21d98732dae5e499b21205c
    https://github.com/scummvm/scummvm/commit/80d72644372c1095b21d98732dae5e499b21205c
Author: Brian Sutherland (bsutherland at webbula.com)
Date: 2026-08-18T21:54:49+03:00

Commit Message:
MADE: Unload music data when stopping playback

DOSMusicPlayer::stop() stopped the parser and then freed its music
resource. The parser reads directly from that resource's buffer, so
its timer callback could access freed memory after an interrupted
track.

Call unloadMusic() before freeing the resource. This clears the
parser's reference in the same way as loading a replacement track.

Assisted-by: Claude:claude-opus-5
Assisted-by: Codex:gpt-5

Changed paths:
    engines/made/music.cpp


diff --git a/engines/made/music.cpp b/engines/made/music.cpp
index 9eb257de1b0..c9618866587 100644
--- a/engines/made/music.cpp
+++ b/engines/made/music.cpp
@@ -182,8 +182,10 @@ void DOSMusicPlayer::resume() {
 }
 
 void DOSMusicPlayer::stop() {
+	// The parser reads the resource buffer directly, so unload it before the
+	// resource is freed below.
 	if (_parser)
-		_parser->stopPlaying();
+		_parser->unloadMusic();
 
 	if (_musicRes) {
 		_vm->_res->freeResource(_musicRes);




More information about the Scummvm-git-logs mailing list