diff options
author | fiddlerwoaroof <fiddlerwoaroof+gb@gmail.com> | 2016-03-03 10:30:00 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2016-03-03 21:31:26 -0500 |
commit | f3f998efd7538a338ca2959c21a93ec633e17737 (patch) | |
tree | bb021550f59fe007c2bb4fcff0a3ed28725dff56 /gdk/x11 | |
parent | 763daf44208762b80d118182bc5b5f2d6cfafc9c (diff) | |
download | gtk+-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.c | 3 |
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"); |