Skip to content

Commit

Permalink
processVisibilitySelf: Add null check
Browse files Browse the repository at this point in the history
  • Loading branch information
past-due authored and pull[bot] committed Oct 6, 2023
1 parent f713134 commit 11504ea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/visibility.cpp
Expand Up @@ -714,7 +714,7 @@ static void processVisibilitySelf(BASE_OBJECT *psObj)
setSeenByInstantly(psStruct->psTarget[0], psObj->player, UBYTE_MAX);
}
DROID *psDroid = castDroid(psObj);
if (psDroid != nullptr && psDroid->action == DACTION_OBSERVE && cbSensorDroid(psDroid))
if (psDroid != nullptr && psDroid->action == DACTION_OBSERVE && cbSensorDroid(psDroid) && psDroid->psActionTarget[0] != nullptr)
{
// Anyone commenting this out will get a knee capping from John.
// You have been warned!!
Expand Down

0 comments on commit 11504ea

Please sign in to comment.