[virt-tools-list] [PATCH virt-viewer 1/4] Remove warning when removing display
Marc-André Lureau
marcandre.lureau at gmail.com
Tue Jun 10 12:18:08 UTC 2014
From: Marc-André Lureau <marcandre.lureau at redhat.com>
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
More information about the virt-tools-list
mailing list