Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 11504ea

Browse files
past-duepull[bot]
authored andcommittedOct 6, 2023
processVisibilitySelf: Add null check
1 parent f713134 commit 11504ea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎src/visibility.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -714,7 +714,7 @@ static void processVisibilitySelf(BASE_OBJECT *psObj)
714714
setSeenByInstantly(psStruct->psTarget[0], psObj->player, UBYTE_MAX);
715715
}
716716
DROID *psDroid = castDroid(psObj);
717-
if (psDroid != nullptr && psDroid->action == DACTION_OBSERVE && cbSensorDroid(psDroid))
717+
if (psDroid != nullptr && psDroid->action == DACTION_OBSERVE && cbSensorDroid(psDroid) && psDroid->psActionTarget[0] != nullptr)
718718
{
719719
// Anyone commenting this out will get a knee capping from John.
720720
// You have been warned!!

0 commit comments

Comments
 (0)
Please sign in to comment.