[cogl] cogl_is_*(): Don't dereference an invalid handle; just return FALSE
An invalid handle is implicitly not of any type.
This commit is contained in:
parent
fff5585b5f
commit
e464acff7a
@ -125,6 +125,9 @@ typedef struct _CoglHandleObject
|
|||||||
{ \
|
{ \
|
||||||
CoglHandleObject *obj = (CoglHandleObject *)handle; \
|
CoglHandleObject *obj = (CoglHandleObject *)handle; \
|
||||||
\
|
\
|
||||||
|
if (handle == COGL_INVALID_HANDLE) \
|
||||||
|
return FALSE; \
|
||||||
|
\
|
||||||
return (obj->klass->type == \
|
return (obj->klass->type == \
|
||||||
_cogl_##type_name##_get_type ()); \
|
_cogl_##type_name##_get_type ()); \
|
||||||
} \
|
} \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user