Skip to content

Commit 5c457c1

Browse files
authored
Merge pull request #148 from tjohnman/bug/null-pointer-in-actor-cast-see-rays
Check for valid pointer before calling CastSeeRays method.
2 parents a0fc9f4 + 9950c38 commit 5c457c1

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Source/Managers/MovableMan.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1371,7 +1371,11 @@ void MovableMan::Update() {
13711371
[&](int start, int end) {
13721372
ZoneScopedN("Actors See");
13731373
for (int i = start; i < end; ++i) {
1374-
m_Actors[i]->CastSeeRays();
1374+
// TODO - this null check really shouldn't be required. There's almost definitely an issue where the actor update can somehow fuck with this mid-update
1375+
// this is VERY bad, and needs investigation!
1376+
if (m_Actors[i]) {
1377+
m_Actors[i]->CastSeeRays();
1378+
}
13751379
}
13761380
});
13771381

0 commit comments

Comments
 (0)