[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:
Robert Bragg 2009-04-04 19:02:01 +01:00
parent fff5585b5f
commit e464acff7a

View File

@ -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 ()); \
} \