diff --git a/tests/qemumonitortestutils.c b/tests/qemumonitortestutils.c index d857c381a4f3ee2dd9b74e745d27afbd824eaa33..15eba5898ef786213495566a84fcc63ef27c9825 100644 --- a/tests/qemumonitortestutils.c +++ b/tests/qemumonitortestutils.c @@ -564,7 +564,8 @@ qemuMonitorTestProcessCommandDefaultValidate(qemuMonitorTestPtr test, if (virAsprintf(&schemapath, "%s/arg-type", cmdname) < 0) goto cleanup; - if (virQEMUQAPISchemaPathGet(schemapath, test->qapischema, &schemaroot) < 0) { + if (virQEMUQAPISchemaPathGet(schemapath, test->qapischema, &schemaroot) < 0 || + !schemaroot) { if (qemuMonitorReportError(test, "command '%s' not found in QAPI schema", cmdname) == 0)