From 75ac7ceb90c98595bf0a6847619df52af7f2ef3f Mon Sep 17 00:00:00 2001 From: epoch Date: Thu, 2 Feb 2017 00:12:58 -0600 Subject: made graphics_init exit instead of return 2 when it fails to open X display --- src/graphics_x11.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/graphics_x11.c b/src/graphics_x11.c index 9839169..b939673 100644 --- a/src/graphics_x11.c +++ b/src/graphics_x11.c @@ -281,7 +281,10 @@ int graphics_init() { // Window root,child;//why do I have this? // XColor toss; printf("# Opening X Display... (%s)\n",getenv("DISPLAY")); - if((x11_global.dpy = XOpenDisplay(0)) == NULL) return printf("# failure.\n"),2; + if((x11_global.dpy = XOpenDisplay(0)) == NULL) { + printf("# failure.\n"); + exit(1); + } else printf("# done.\n"); x11_global.color_map=DefaultColormap(x11_global.dpy, DefaultScreen(x11_global.dpy)); printf("# generating grays...\n"); -- cgit v1.2.3