summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'x11-misc/hsetroot/files/hsetroot-1.0.5-XOpenDisplay.patch')
-rw-r--r--x11-misc/hsetroot/files/hsetroot-1.0.5-XOpenDisplay.patch15
1 files changed, 15 insertions, 0 deletions
diff --git a/x11-misc/hsetroot/files/hsetroot-1.0.5-XOpenDisplay.patch b/x11-misc/hsetroot/files/hsetroot-1.0.5-XOpenDisplay.patch
new file mode 100644
index 000000000000..0585072538f2
--- /dev/null
+++ b/x11-misc/hsetroot/files/hsetroot-1.0.5-XOpenDisplay.patch
@@ -0,0 +1,15 @@
+--- a/hsr-outputs.c
++++ b/hsr-outputs.c
+@@ -47,7 +47,11 @@
+ int
+ main(int argc, char **argv)
+ {
+- Display *display = XOpenDisplay(NULL);
++ Display *display;
++ if (!(display = XOpenDisplay(NULL))) {
++ fprintf(stderr, "Cannot open X display!\n");
++ exit(123);
++ }
+
+ enum Format format = TEXT;
+ void (*print)(XineramaScreenInfo*) = print_text;