summaryrefslogtreecommitdiff
path: root/gdk/x11
diff options
context:
space:
mode:
authorfiddlerwoaroof <fiddlerwoaroof+gb@gmail.com>2016-03-03 10:30:00 -0500
committerMatthias Clasen <mclasen@redhat.com>2016-03-03 21:31:26 -0500
commitf3f998efd7538a338ca2959c21a93ec633e17737 (patch)
treebb021550f59fe007c2bb4fcff0a3ed28725dff56 /gdk/x11
parent763daf44208762b80d118182bc5b5f2d6cfafc9c (diff)
downloadgtk+-f3f998efd7538a338ca2959c21a93ec633e17737.tar.gz
Check if XRRGetOutputInfo returned a null pointer.
Fixes bug 763023: in certain circumstances, XRRGetOutputInfo will return a null pointer. This commit adds a check to detect and handle this return value.
Diffstat (limited to 'gdk/x11')
-rw-r--r--gdk/x11/gdkscreen-x11.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gdk/x11/gdkscreen-x11.c b/gdk/x11/gdkscreen-x11.c
index 82b8aa2132..063b597922 100644
--- a/gdk/x11/gdkscreen-x11.c
+++ b/gdk/x11/gdkscreen-x11.c
@@ -653,6 +653,9 @@ init_randr15 (GdkScreen *screen)
XRRGetOutputInfo (x11_screen->xdisplay, resources, output);
GdkX11Monitor monitor;
+ if (output_info == NULL)
+ continue;
+
/* Non RandR1.2+ X driver have output name "default" */
randr12_compat |= !g_strcmp0 (output_info->name, "default");