diff options
-rw-r--r-- | qapi/qmp-input-visitor.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/qapi/qmp-input-visitor.c b/qapi/qmp-input-visitor.c index fc91e74894..c7deca95b3 100644 --- a/qapi/qmp-input-visitor.c +++ b/qapi/qmp-input-visitor.c @@ -64,6 +64,7 @@ static QObject *qmp_input_get_object(QmpInputVisitor *qiv, if (QSLIST_EMPTY(&qiv->stack)) { /* Starting at root, name is ignored. */ + assert(qiv->root); return qiv->root; } @@ -395,6 +396,7 @@ Visitor *qmp_input_visitor_new(QObject *obj, bool strict) { QmpInputVisitor *v; + assert(obj); v = g_malloc0(sizeof(*v)); v->visitor.type = VISITOR_INPUT; |