mirror of
https://github.com/brl/mutter.git
synced 2025-02-27 02:04:09 +00: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
ed272213f0
commit
6a3588101b
@ -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…
x
Reference in New Issue
Block a user