diff --git a/gdk/x11/gdkscreen-x11.c b/gdk/x11/gdkscreen-x11.c
index 82b8aa2..c3ee5e9 100644
--- a/gdk/x11/gdkscreen-x11.c
+++ b/gdk/x11/gdkscreen-x11.c
@@ -651,6 +651,10 @@ init_randr15 (GdkScreen *screen)
       RROutput output = rr_monitors[i].outputs[0];
       XRROutputInfo *output_info =
         XRRGetOutputInfo (x11_screen->xdisplay, resources, output);
+
+      if (!output_info)
+        continue;
+
       GdkX11Monitor monitor;
 
       /* Non RandR1.2+ X driver have output name "default" */
