fx: object: add nullptr check to fx_object_is_type

This commit is contained in:
2026-05-29 19:59:55 +01:00
parent e53027595e
commit f879d4fdfc
+4
View File
@@ -100,6 +100,10 @@ fx_status fx_object_to_string(
bool fx_object_is_type(const struct _fx_object *p, fx_type_id type) 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) { if (fx_type_id_compare(&p->obj_type->ty_id, type) == 0) {
return true; return true;
} }