From 296ecdfe172fbbd0f3f4a14238990a896fa3d2f4 Mon Sep 17 00:00:00 2001 From: MysterD Date: Thu, 20 Apr 2023 21:30:46 -0700 Subject: [PATCH] Fixed crash in bhv_chain_chomp_chain_part_update() --- src/game/behaviors/chain_chomp.inc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/game/behaviors/chain_chomp.inc.c b/src/game/behaviors/chain_chomp.inc.c index c2ddd964..0f8177a6 100644 --- a/src/game/behaviors/chain_chomp.inc.c +++ b/src/game/behaviors/chain_chomp.inc.c @@ -31,7 +31,9 @@ void bhv_chain_chomp_chain_part_update(void) { if (!sync_object_is_initialized(o->oSyncID)) { sync_object_init(o, SYNC_DISTANCE_ONLY_DEATH); } - + + if (!o->parentObj) { return; } + if (o->parentObj->activeFlags == ACTIVE_FLAG_DEACTIVATED || o->parentObj->oAction == CHAIN_CHOMP_ACT_UNLOAD_CHAIN) { obj_mark_for_deletion(o); network_send_object(o);