[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
1 changed files with 3 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue