summaryrefslogtreecommitdiffstats
path: root/krandr/lowlevel_randr.c
diff options
context:
space:
mode:
Diffstat (limited to 'krandr/lowlevel_randr.c')
-rw-r--r--krandr/lowlevel_randr.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/krandr/lowlevel_randr.c b/krandr/lowlevel_randr.c
index 5326f0334..251d3bef5 100644
--- a/krandr/lowlevel_randr.c
+++ b/krandr/lowlevel_randr.c
@@ -384,6 +384,10 @@ struct ScreenInfo* internal_read_screen_info (Display *display)
sr = XRRGetScreenResources (display, root_window);
+ if (sr == NULL) {
+ return NULL;
+ }
+
screen_info = malloc (sizeof (struct ScreenInfo));
screen_info->dpy = display;
screen_info->window = root_window;