[pve-devel] [PATCH] Change check for better understanding!

Wolfgang Link wolfgang at linksystems.org
Mon Dec 29 10:56:07 CET 2014


Signed-off-by: Wolfgang Link <wolfgang at linksystems.org>
---
 PVE/QemuServer.pm |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index cb84f42..9ef186e 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -3724,7 +3724,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);
-- 
1.7.10.4





More information about the pve-devel mailing list