diff --git a/gdk/x11/gdkscreen-x11.c b/gdk/x11/gdkscreen-x11.c
index a668aeb..284957a 100644
--- a/gdk/x11/gdkscreen-x11.c
+++ b/gdk/x11/gdkscreen-x11.c
@@ -385,7 +385,9 @@ gint
 gdk_screen_get_monitor_width_mm	(GdkScreen *screen,
 				 gint       monitor_num)
 {
-  return get_monitor (screen, monitor_num)->width_mm;
+  GdkX11Monitor *monitor = get_monitor (screen, monitor_num);
+  g_return_val_if_fail (monitor != NULL, 0);
+  return monitor->width_mm;
 }
 
 /**
@@ -403,7 +405,9 @@ gint
 gdk_screen_get_monitor_height_mm (GdkScreen *screen,
                                   gint       monitor_num)
 {
-  return get_monitor (screen, monitor_num)->height_mm;
+  GdkX11Monitor *monitor = get_monitor (screen, monitor_num);
+  g_return_val_if_fail (monitor != NULL, 0);
+  return monitor->height_mm;
 }
 
 /**
@@ -424,7 +428,9 @@ gchar *
 gdk_screen_get_monitor_plug_name (GdkScreen *screen,
 				  gint       monitor_num)
 {
-  return g_strdup (get_monitor (screen, monitor_num)->output_name);
+  GdkX11Monitor *monitor = get_monitor (screen, monitor_num);
+  g_return_val_if_fail (monitor != NULL, NULL);
+  return g_strdup (monitor->output_name);
 }
 
 /**
@@ -444,7 +450,9 @@ XID
 gdk_x11_screen_get_monitor_output (GdkScreen *screen,
                                    gint       monitor_num)
 {
-  return get_monitor (screen, monitor_num)->output;
+  GdkX11Monitor *monitor = get_monitor (screen, monitor_num);
+  g_return_val_if_fail (monitor != NULL, 0);
+  return monitor->output;
 }
 
 /**
@@ -469,6 +477,7 @@ gdk_screen_get_monitor_geometry (GdkScreen    *screen,
   if (dest) 
     {
       GdkX11Monitor *monitor = get_monitor (screen, monitor_num);
+      g_return_if_fail (monitor != NULL);
 
       *dest = monitor->geometry;
     }
