diff options
Diffstat (limited to 'tests/libqtest.h')
-rw-r--r-- | tests/libqtest.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/libqtest.h b/tests/libqtest.h index 5937f91912..a16acd58a6 100644 --- a/tests/libqtest.h +++ b/tests/libqtest.h @@ -17,6 +17,9 @@ #ifndef LIBQTEST_H #define LIBQTEST_H +#include "qapi/qmp/qobject.h" +#include "qapi/qmp/qdict.h" + typedef struct QTestState QTestState; extern QTestState *global_qtest; @@ -598,6 +601,9 @@ static inline QTestState *qtest_start(const char *args) */ static inline void qtest_end(void) { + if (!global_qtest) { + return; + } qtest_quit(global_qtest); global_qtest = NULL; } |