aboutsummaryrefslogtreecommitdiff
path: root/tests/libqtest.h
diff options
context:
space:
mode:
Diffstat (limited to 'tests/libqtest.h')
-rw-r--r--tests/libqtest.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/libqtest.h b/tests/libqtest.h
index 5937f91912..1a2f87ef0b 100644
--- a/tests/libqtest.h
+++ b/tests/libqtest.h
@@ -598,6 +598,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;
}