Change check for better understanding!

Signed-off-by: Wolfgang Link <wolfgang@linksystems.org>
This commit is contained in:
Wolfgang Link 2014-12-29 10:56:07 +01:00 committed by Dietmar Maurer
parent e7a43f20a2
commit fbda796564

View File

@ -4193,7 +4193,7 @@ sub vm_stop {
eval {
if ($shutdown) {
if (!$nocheck && $conf->{agent}) {
if (defined($conf) && $conf->{agent}) {
vm_qmp_command($vmid, { execute => "guest-shutdown" }, $nocheck);
} else {
vm_qmp_command($vmid, { execute => "system_powerdown" }, $nocheck);