From c56332857145d1c6741d4f6c1bbc87dcc6c6ab97 Mon Sep 17 00:00:00 2001 From: Aurélien Aptel Date: Fri, 27 Aug 2010 13:53:27 +0200 Subject: removed XINERAMA from config.mk and fixed a segfault when st is started without a display. (thx Hiltjo Posthuma) --- st.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'st.c') diff --git a/st.c b/st.c index 8dfd4a7..623ca29 100644 --- a/st.c +++ b/st.c @@ -1078,10 +1078,9 @@ xhints(void) void xinit(void) { - xw.dis = XOpenDisplay(NULL); - xw.scr = XDefaultScreen(xw.dis); - if(!xw.dis) + if(!(xw.dis = XOpenDisplay(NULL))) die("Can't open display\n"); + xw.scr = XDefaultScreen(xw.dis); /* font */ if(!(dc.font = XLoadQueryFont(xw.dis, FONT)) || !(dc.bfont = XLoadQueryFont(xw.dis, BOLDFONT))) -- cgit v1.2.3-70-g09d2