From 8a6a0e74936abbeb00d0bb59381ac06ed6639c30 Mon Sep 17 00:00:00 2001 From: Sara Date: Wed, 12 Jul 2023 02:47:31 +0200 Subject: [PATCH] physics.c: can_collide now checks for object_is_valid before comfirming other variables --- src/corelib/physics.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/physics.c b/src/corelib/physics.c index 02890e3..6ac2844 100644 --- a/src/corelib/physics.c +++ b/src/corelib/physics.c @@ -24,7 +24,7 @@ void object_broadcast_collision(object_t* this, object_t* other) { } } short can_collide(const object_t* this) { - return this->active && this->enabled; + return object_is_valid(this) && this->enabled; } static inline