From 17e3c48d0a2ebd0a7d46810ecc681cb732a53316 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Tue, 21 May 2013 18:25:16 +0200 Subject: [PATCH] Fix trivial critical GLib-CRITICAL **: g_strv_length: assertion `str_array != NULL' Committed without review under trivial rule. --- src/remote-viewer-main.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/remote-viewer-main.c b/src/remote-viewer-main.c index ee0025e..3838d5e 100644 --- a/src/remote-viewer-main.c +++ b/src/remote-viewer-main.c @@ -177,11 +177,13 @@ main(int argc, char **argv) } } else #endif - if (g_strv_length(args) > 1) { - g_printerr(_("Error: can't handle multiple URIs\n")); - goto cleanup; - } else if (g_strv_length(args) == 1) { - uri = g_strdup(args[0]); + if (args) { + if (g_strv_length(args) > 1) { + g_printerr(_("Error: can't handle multiple URIs\n")); + goto cleanup; + } else if (g_strv_length(args) == 1) { + uri = g_strdup(args[0]); + } } if (zoom < 10 || zoom > 200) {