aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRyan Tandy <ryan@nardis.ca>2013-12-28 13:51:24 -0800
committerRyan Tandy <ryan@nardis.ca>2013-12-28 13:51:24 -0800
commitb08a8c02fbcb63712593fb3446b225c062b81d6a (patch)
treeddf2ecfc155ad284cbb70174dbb48cf5b06a8bc8 /src
parent43453108a6d53ecf724665ee5c353d2028f6021d (diff)
downloadmirror-meh-b08a8c02fbcb63712593fb3446b225c062b81d6a.tar.gz
mirror-meh-b08a8c02fbcb63712593fb3446b225c062b81d6a.tar.bz2
mirror-meh-b08a8c02fbcb63712593fb3446b225c062b81d6a.zip
check return value of XOpenDisplay before using
Diffstat (limited to 'src')
-rw-r--r--src/xlib.c2
1 files changed, 1 insertions, 1 deletions
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);