diff options
Diffstat (limited to 'include/qapi/qmp/qobject.h')
-rw-r--r-- | include/qapi/qmp/qobject.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/qapi/qmp/qobject.h b/include/qapi/qmp/qobject.h index c856f553b7..4b96ed5837 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); |