[Scummvm-git-logs] scummvm master -> 108f9cac09e70a9d595b69eb3e7d1f817dd11374
kelmer44
noreply at scummvm.org
Fri May 22 12:12:44 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:
108f9cac09 PELROCK: makes sure npc is initialized before accesing values - PVS-Code V595
Commit: 108f9cac09e70a9d595b69eb3e7d1f817dd11374
https://github.com/scummvm/scummvm/commit/108f9cac09e70a9d595b69eb3e7d1f817dd11374
Author: kelmer (kelmer at gmail.com)
Date: 2026-05-22T14:12:26+02:00
Commit Message:
PELROCK: makes sure npc is initialized before accesing values - PVS-Code V595
Changed paths:
engines/pelrock/pelrock.cpp
diff --git a/engines/pelrock/pelrock.cpp b/engines/pelrock/pelrock.cpp
index ba52a4b303a..1bd056ff7f3 100644
--- a/engines/pelrock/pelrock.cpp
+++ b/engines/pelrock/pelrock.cpp
@@ -1992,8 +1992,8 @@ void PelrockEngine::pyramidCollapse() {
npc->zOrder = 254;
npc = _room->findSpriteByIndex(0);
- npc->animData[0].nframes = 5;
if (npc) {
+ npc->animData[0].nframes = 5;
npc->animData[npc->curAnimIndex].movementFlags = 0x1C;
npc->y -= 25; // One-time nudge upward to emerge from behind pyramid
}
@@ -2035,9 +2035,10 @@ void PelrockEngine::pyramidCollapse() {
// Stop NPC movement
npc = _room->findSpriteByIndex(0);
- npc->animData[0].nframes = 1;
- if (npc)
+ if (npc) {
+ npc->animData[0].nframes = 1;
npc->animData[npc->curAnimIndex].movementFlags = 0;
+ }
_dialog->say(_res->_ingameTexts[kTextPor5Minutos], 0);
More information about the Scummvm-git-logs
mailing list