From b08a8c02fbcb63712593fb3446b225c062b81d6a Mon Sep 17 00:00:00 2001 From: Ryan Tandy Date: Sat, 28 Dec 2013 13:51:24 -0800 Subject: check return value of XOpenDisplay before using --- src/xlib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xlib.c b/src/xlib.c index fc6895d..2912321 100644 --- a/src/xlib.c +++ b/src/xlib.c @@ -173,8 +173,8 @@ static int xquit(Display *d){ void backend_init(){ display = XOpenDisplay (NULL); - xfd = ConnectionNumber(display); assert(display); + xfd = ConnectionNumber(display); screen = DefaultScreen(display); window = XCreateWindow(display, DefaultRootWindow(display), 0, 0, 640, 480, 0, DefaultDepth(display, screen), InputOutput, CopyFromParent, 0, NULL); -- cgit v1.2.3