[PATCH virt-viewer 1/4] Remove warning when removing display

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Marc-André Lureau <marcandre.lureau@xxxxxxxxxx>

Some display have no associated window (for ex, if it doesn't fit
on client monitors).

(remote-viewer:22275): remote-viewer-CRITICAL **: virt_viewer_window_set_display: assertion `VIRT_VIEWER_IS_WINDOW(self)' failed

(remote-viewer:22275): remote-viewer-CRITICAL **: virt_viewer_app_remove_nth_window: assertion `win != NULL' failed

https://bugzilla.redhat.com/show_bug.cgi?id=1107518
---
 src/virt-viewer-app.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/virt-viewer-app.c b/src/virt-viewer-app.c
index 92ecc64..1633c25 100644
--- a/src/virt-viewer-app.c
+++ b/src/virt-viewer-app.c
@@ -870,8 +870,10 @@ virt_viewer_app_display_removed(VirtViewerSession *session G_GNUC_UNUSED,
     gtk_widget_hide(GTK_WIDGET(display));
     g_object_get(display, "nth-display", &nth, NULL);
     win = virt_viewer_app_get_nth_window(self, nth);
-    virt_viewer_window_set_display(win, NULL);
+    if (!win)
+        return;
 
+    virt_viewer_window_set_display(win, NULL);
     if (nth != 0)
         virt_viewer_app_remove_nth_window(self, nth);
 }
-- 
1.9.3

_______________________________________________
virt-tools-list mailing list
virt-tools-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/virt-tools-list





[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux