From 0698121853076d92d0243da5f0953c1c8e2a7a31 Mon Sep 17 00:00:00 2001 From: Sara Date: Wed, 12 Jul 2023 02:49:36 +0200 Subject: [PATCH] object_is_valid now confirms that an object is not null and is active --- src/corelib/object.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/object.h b/src/corelib/object.h index 362efb6..ea38c6e 100644 --- a/src/corelib/object.h +++ b/src/corelib/object.h @@ -26,7 +26,7 @@ object_t object_default(); void object_draw_sprite(object_t* object); static inline int object_is_valid(const object_t* object) { - return object == NULL || object->active == 0; + return object != NULL && object->active != 0; } #endif /* _object_h */