[Scummvm-git-logs] scummvm master -> 6ce26620f6f1b397932ba3f46276e294b080b016
kelmer44
noreply at scummvm.org
Thu May 28 08:53:40 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:
6ce26620f6 PELROCK: Remove useless check on saveload.cpp, add null safety check on actions.cpp. PVS-Studio V547, V522
Commit: 6ce26620f6f1b397932ba3f46276e294b080b016
https://github.com/scummvm/scummvm/commit/6ce26620f6f1b397932ba3f46276e294b080b016
Author: kelmer (kelmer at gmail.com)
Date: 2026-05-28T10:53:32+02:00
Commit Message:
PELROCK: Remove useless check on saveload.cpp, add null safety check on actions.cpp. PVS-Studio V547, V522
Changed paths:
engines/pelrock/actions.cpp
engines/pelrock/saveload.cpp
diff --git a/engines/pelrock/actions.cpp b/engines/pelrock/actions.cpp
index 54c8c359314..8324af1ae82 100644
--- a/engines/pelrock/actions.cpp
+++ b/engines/pelrock/actions.cpp
@@ -2383,6 +2383,8 @@ void PelrockEngine::antiPiracyEffect() {
// Generate noise
const int kNoiseLength = 8000; // ~1 second at 8000 Hz, will loop
byte *noiseData = (byte *)malloc(kNoiseLength);
+ if (!noiseData)
+ return;
for (int i = 0; i < kNoiseLength; i++) {
noiseData[i] = (byte)((getRandomNumber(255)));
}
diff --git a/engines/pelrock/saveload.cpp b/engines/pelrock/saveload.cpp
index c8598ef2b42..bd94497a05e 100644
--- a/engines/pelrock/saveload.cpp
+++ b/engines/pelrock/saveload.cpp
@@ -349,8 +349,6 @@ Common::Error PelrockEngine::syncGame(Common::Serializer &s) {
if (s.isLoading()) {
SaveGameData saveGame;
- if (saveGame.gameState != nullptr)
- delete saveGame.gameState;
saveGame.gameState = new GameStateData();
result = syncSaveData(s, &(saveGame));
loadGame(saveGame);
More information about the Scummvm-git-logs
mailing list