Follow the trend to explicitly create containers, do that for console.c on "/backend" container.
Cc: Marc-André Lureau <marcandre.lur...@redhat.com> Signed-off-by: Peter Xu <pet...@redhat.com> --- ui/console.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/console.c b/ui/console.c index 5165f17125..36f8c6debb 100644 --- a/ui/console.c +++ b/ui/console.c @@ -1154,14 +1154,14 @@ DisplayState *init_displaystate(void) { gchar *name; QemuConsole *con; + Object *backend = container_create(object_get_root(), "backend"); QTAILQ_FOREACH(con, &consoles, next) { /* Hook up into the qom tree here (not in object_new()), once * all QemuConsoles are created and the order / numbering * doesn't change any more */ name = g_strdup_printf("console[%d]", con->index); - object_property_add_child(container_get(object_get_root(), "/backend"), - name, OBJECT(con)); + object_property_add_child(backend, name, OBJECT(con)); g_free(name); } -- 2.45.0