From f879d4fdfc8fb1272c8487b553ae4aa1f9b8770c Mon Sep 17 00:00:00 2001 From: Max Wash Date: Fri, 29 May 2026 19:59:55 +0100 Subject: [PATCH] fx: object: add nullptr check to fx_object_is_type --- fx/object.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fx/object.c b/fx/object.c index 17b859b..a89936c 100644 --- a/fx/object.c +++ b/fx/object.c @@ -100,6 +100,10 @@ fx_status fx_object_to_string( bool fx_object_is_type(const struct _fx_object *p, fx_type_id type) { + if (!p) { + return false; + } + if (fx_type_id_compare(&p->obj_type->ty_id, type) == 0) { return true; }