From c64485adfd98eb3a9058c82f9cb782bf622503f6 Mon Sep 17 00:00:00 2001 From: Gabor Apati-Nagy Date: Tue, 9 Sep 2014 15:46:26 +0100 Subject: [PATCH] CP-9365: XenCenter work for HVM linux support -Fixing issue found by the reviewer: null reference exception when the VM restarts --- XenAdmin/ConsoleView/VNCTabView.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/XenAdmin/ConsoleView/VNCTabView.cs b/XenAdmin/ConsoleView/VNCTabView.cs index 8f016e801..948bc0e80 100644 --- a/XenAdmin/ConsoleView/VNCTabView.cs +++ b/XenAdmin/ConsoleView/VNCTabView.cs @@ -483,7 +483,8 @@ namespace XenAdmin.ConsoleView this.guestMetrics.PropertyChanged -= guestMetrics_PropertyChanged; this.guestMetrics = newGuestMetrics; - guestMetrics.PropertyChanged += guestMetrics_PropertyChanged; + if (this.guestMetrics != null) + guestMetrics.PropertyChanged += guestMetrics_PropertyChanged; EnableRDPIfCapable(); }