diff --git a/src/platform/backends/qemu/qemu_virtual_machine.cpp b/src/platform/backends/qemu/qemu_virtual_machine.cpp index 19d454a8c0..d18ac8dd34 100644 --- a/src/platform/backends/qemu/qemu_virtual_machine.cpp +++ b/src/platform/backends/qemu/qemu_virtual_machine.cpp @@ -367,7 +367,10 @@ void mp::QemuVirtualMachine::shutdown(const bool force) mpl::log(mpl::Level::info, vm_name, "Killing process"); lock.unlock(); vm_process->kill(); - vm_process->wait_for_finished(timeout); + if (vm_process != nullptr && !vm_process->wait_for_finished(timeout)) + { + mpl::log(mpl::Level::error, vm_name, "Killing qemu process could not finish."); + } } else {