This can happen with the qemu-qmp binaries.
Signed-off-by: Paolo Bonzini <[email protected]>
---
migration/migration.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/migration/migration.c b/migration/migration.c
index bcc385b94b..075b21d9b5 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -226,6 +226,10 @@ void migration_cancel(const Error *error)
void migration_shutdown(void)
{
+ if (!current_migration) {
+ return;
+ }
+
/*
* When the QEMU main thread exit, the COLO thread
* may wait a semaphore. So, we should wakeup the
--
2.31.1