prevent e objects from achieving a negative refcount, possible during cleanup functions

SVN revision: 76220
This commit is contained in:
Mike Blumenkrantz 2012-09-06 06:48:53 +00:00
parent e9dfdd2fa9
commit fb51746799
1 changed files with 1 additions and 0 deletions

View File

@ -101,6 +101,7 @@ e_object_unref(E_Object *obj)
int ref;
E_OBJECT_CHECK_RETURN(obj, -1);
if (!obj->references) return 0;
obj->references--;
ref = obj->references;
if (obj->references == 0) e_object_free(obj);