Skip to content

Commit

Permalink
Collisions: Fix null pointer dereference with the flying eye spell
Browse files Browse the repository at this point in the history
Fixes: issue #511
(cherry picked from commit 4940f84)
  • Loading branch information
dscharrer committed Aug 23, 2021
1 parent 2d617ef commit 1f94c55
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/physics/Collisions.cpp
Expand Up @@ -561,10 +561,10 @@ static void CheckAnythingInCylinder_Inner(const Cylinder & cyl, Entity * ioo, lo

if(ioo == entities.player()) {
sp.radius = 22.f;
} else if(ioo->ioflags & IO_NPC) {
sp.radius = 26.f;
} else {
} else if(ioo && !(ioo->ioflags & IO_NPC)) {
sp.radius = 22.f;
} else {
sp.radius = 26.f;
}

if(SphereInCylinder(cyl, sp)) {
Expand Down

0 comments on commit 1f94c55

Please sign in to comment.