aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/xlib.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/xlib.c b/src/xlib.c
index 2912321..ebc3a4c 100644
--- a/src/xlib.c
+++ b/src/xlib.c
@@ -172,8 +172,11 @@ static int xquit(Display *d){
}
void backend_init(){
- display = XOpenDisplay (NULL);
- assert(display);
+ display = XOpenDisplay(NULL);
+ if(!display){
+ fprintf(stderr, "Can't open X display.\n");
+ exit(EXIT_FAILURE);
+ }
xfd = ConnectionNumber(display);
screen = DefaultScreen(display);