fx: object: add nullptr check to fx_object_is_type
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user