From de02ffbf7126e891ffdca59afb8dc28c36b39573 Mon Sep 17 00:00:00 2001 From: MysterD Date: Sun, 13 Feb 2022 17:05:25 -0800 Subject: [PATCH] Fixed init_shadow crash --- src/game/shadow.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/game/shadow.c b/src/game/shadow.c index 9066aad9..5bbb4e9c 100644 --- a/src/game/shadow.c +++ b/src/game/shadow.c @@ -223,7 +223,7 @@ s8 init_shadow(struct Shadow *s, f32 xPos, f32 yPos, f32 zPos, s16 shadowScale, s->floorNormalY = 1.0; s->floorNormalZ = 0; s->floorOriginOffset = -waterLevel; - } else { + } else if (floorGeometry != NULL) { // Don't draw a shadow if the floor is lower than expected possible, // or if the y-normal is negative (an unexpected result). if (s->floorHeight < -10000.0 || floorGeometry->normalY <= 0.0) {