Skip to content

Commit 11504ea

Browse files
past-duepull[bot]
authored andcommitted
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

+1-1
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)