aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/yawa.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/yawa.c b/src/yawa.c
index ac52c00..ff68732 100644
--- a/src/yawa.c
+++ b/src/yawa.c
@@ -305,6 +305,10 @@ main(signed argc, char **argv)
Pixmap pixmap;
Imlib_Color_Modifier modifier = NULL;
_display = XOpenDisplay(NULL);
+ if (!_display) {
+ fprintf(stderr, "X display could not be opened\n");
+ exit(1);
+ }
for (screen = 0; screen < ScreenCount(_display); screen++) {
display = XOpenDisplay(NULL);