Skip to content

Commit

Permalink
Merge #3089
Browse files Browse the repository at this point in the history
3089: [qemu] Fix crash on concurrent shutdown r=townsend2010 a=ricab



Co-authored-by: Ricardo Abreu <[email protected]>
  • Loading branch information
townsend2010 and ricab authored Jun 28, 2023
2 parents 055a80f + afb0bc0 commit c334808
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/platform/backends/qemu/qemu_virtual_machine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ void mp::QemuVirtualMachine::shutdown()
{
mpl::log(mpl::Level::info, vm_name, fmt::format("Ignoring shutdown issued while suspended"));
}
else if ((state == State::running || state == State::delayed_shutdown || state == State::unknown) &&
else if ((state == State::running || state == State::delayed_shutdown || state == State::unknown) && vm_process &&
vm_process->running())
{
vm_process->write(qmp_execute_json("system_powerdown"));
Expand Down

0 comments on commit c334808

Please sign in to comment.