From 06186d82c57b2545db2d6b1a6665f23d1b6a3cfd Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Sun, 13 Jan 2013 12:29:03 -0800 Subject: -help should not fail if display cannot be opened Signed-off-by: Alan Coopersmith --- xstdcmap.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'xstdcmap.c') diff --git a/xstdcmap.c b/xstdcmap.c index 0c4c934..0e73158 100644 --- a/xstdcmap.c +++ b/xstdcmap.c @@ -339,16 +339,16 @@ main(int argc, char *argv[]) parse(argc, argv); + if (help) { + usage(0); + } + if ((dpy = XOpenDisplay(display_name)) == NULL) { (void) fprintf(stderr, "%s: cannot open display \"%s\".\n", program_name, XDisplayName(display_name)); exit(1); } - if (help) { - usage(0); - } - if (all) { if (verbose) (void) fprintf(stderr, -- cgit v1.2.3