Message ID | 1447091204-10226-4-git-send-email-armbru@redhat.com |
---|---|
State | New |
Headers | show |
diff --git a/include/qapi/qmp/qobject.h b/include/qapi/qmp/qobject.h index c856f55..4b96ed5 100644 --- a/include/qapi/qmp/qobject.h +++ b/include/qapi/qmp/qobject.h @@ -90,6 +90,7 @@ static inline void qobject_incref(QObject *obj) */ static inline void qobject_decref(QObject *obj) { + assert(!obj || obj->refcnt); if (obj && --obj->refcnt == 0) { assert(obj->type != NULL); assert(obj->type->destroy != NULL);