summaryrefslogtreecommitdiffstats
path: root/include/qapi/qmp/qobject.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/qapi/qmp/qobject.h')
-rw-r--r--include/qapi/qmp/qobject.h1
1 files changed, 1 insertions, 0 deletions
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);
OpenPOWER on IntegriCloud