[Scummvm-git-logs] scummvm master -> d3930af51fb76aa21c0b4be6685e6af879f764b7

mgerhardy noreply at scummvm.org
Tue Jul 7 08:40:13 UTC 2026


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

Summary:
6af3d26636 MACS2: use Common::move for music slots
d3930af51f MACS2: ensure that the inventory source is not null


Commit: 6af3d26636f4988ccf2fef36345b8834f28d2db5
    https://github.com/scummvm/scummvm/commit/6af3d26636f4988ccf2fef36345b8834f28d2db5
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2026-07-07T10:39:41+02:00

Commit Message:
MACS2: use Common::move for music slots

Changed paths:
    engines/macs2/scriptexecutor.cpp


diff --git a/engines/macs2/scriptexecutor.cpp b/engines/macs2/scriptexecutor.cpp
index f735ce4e4cb..852feb5ba51 100644
--- a/engines/macs2/scriptexecutor.cpp
+++ b/engines/macs2/scriptexecutor.cpp
@@ -2684,7 +2684,7 @@ void Script::ScriptExecutor::scriptLoadMusicSlot() {
 
 	Common::Array<uint8> slotData;
 	if (loadMusicResource(slotData, resourceIndex)) {
-		_musicSlots[slotID - 1] = slotData;
+		_musicSlots[slotID - 1] = Common::move(slotData);
 	}
 }
 


Commit: d3930af51fb76aa21c0b4be6685e6af879f764b7
    https://github.com/scummvm/scummvm/commit/d3930af51fb76aa21c0b4be6685e6af879f764b7
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2026-07-07T10:39:41+02:00

Commit Message:
MACS2: ensure that the inventory source is not null

Changed paths:
    engines/macs2/view1.cpp


diff --git a/engines/macs2/view1.cpp b/engines/macs2/view1.cpp
index 7bda706c140..0b6f52c1589 100644
--- a/engines/macs2/view1.cpp
+++ b/engines/macs2/view1.cpp
@@ -288,6 +288,10 @@ void View1::closeInventory() {
 }
 
 void View1::setInventorySource(GameObject *newInventorySource) {
+	if (newInventorySource == nullptr) {
+		warning("Tried to set inventory source to a null object");
+		return;
+	}
 	_inventorySource = newInventorySource;
 	// Rebuild inventory list from all objects whose SceneIndex matches.
 	// Binary (syncInventoryObjectList at 1008:071e) checks: object.sceneIndex == actorIndex + 0x400.




More information about the Scummvm-git-logs mailing list