mirror of
https://github.com/brl/mutter.git
synced 2024-11-24 17:10:40 -05:00
cogl: Do not unref a NULL object
Add return-if-fail statement to avoid deferencing NULL object
This commit is contained in:
parent
0b3a1c9c31
commit
3104d697c0
@ -109,7 +109,11 @@ _cogl_object_default_unref (void *object)
|
||||
void
|
||||
cogl_object_unref (void *obj)
|
||||
{
|
||||
void (* unref_func) (void *) = ((CoglObject *) obj)->klass->virt_unref;
|
||||
void (* unref_func) (void *);
|
||||
|
||||
_COGL_RETURN_IF_FAIL (obj != NULL);
|
||||
|
||||
unref_func = ((CoglObject *) obj)->klass->virt_unref;
|
||||
unref_func (obj);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user