diff --git a/src/game/behaviors/water_splashes_and_waves.inc.c b/src/game/behaviors/water_splashes_and_waves.inc.c index 666fc62b..f0ddc13c 100644 --- a/src/game/behaviors/water_splashes_and_waves.inc.c +++ b/src/game/behaviors/water_splashes_and_waves.inc.c @@ -76,11 +76,13 @@ void bhv_water_droplet_loop(void) { // Create the smaller splash struct Object* small = try_to_spawn_object(0, 1.0f, o, MODEL_SMALL_WATER_SPLASH, bhvWaterDropletSplash); - // immediately update render position - small->parentObj = NULL; - small->header.gfx.pos[0] = o->oPosX; - small->header.gfx.pos[1] = o->oPosY; - small->header.gfx.pos[2] = o->oPosZ; + if (small != NULL) { + // immediately update render position + small->parentObj = NULL; + small->header.gfx.pos[0] = o->oPosX; + small->header.gfx.pos[1] = o->oPosY; + small->header.gfx.pos[2] = o->oPosZ; + } obj_mark_for_deletion(o); } else if (o->oTimer > 20)