[virt-tools-list] [PATCH virt-viewer 1/3] app: Return early on empty monitor mapping
Pavel Grunt
pgrunt at redhat.com
Mon Feb 15 07:18:53 UTC 2016
Resolves:
https://bugzilla.redhat.com/show_bug.cgi?id=1304648
---
src/virt-viewer-app.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/virt-viewer-app.c b/src/virt-viewer-app.c
index 653b30c..d4ce06a 100644
--- a/src/virt-viewer-app.c
+++ b/src/virt-viewer-app.c
@@ -382,6 +382,11 @@ virt_viewer_app_parse_monitor_mappings(gchar **mappings, gsize nmappings)
int max_display_id = 0;
gchar **tokens = NULL;
+ if (nmappings == 0) {
+ g_warning("Empty monitor-mapping configuration");
+ goto configerror;
+ }
+
for (i = 0; i < nmappings; i++) {
gchar *endptr = NULL;
gint display = 0, monitor = 0;
--
2.5.0
More information about the virt-tools-list
mailing list