mirror of
https://github.com/brl/mutter.git
synced 2024-11-26 18:11:05 -05:00
[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; \
|
||||
\
|
||||
if (handle == COGL_INVALID_HANDLE) \
|
||||
return FALSE; \
|
||||
\
|
||||
return (obj->klass->type == \
|
||||
_cogl_##type_name##_get_type ()); \
|
||||
} \
|
||||
|
Loading…
Reference in New Issue
Block a user