[gtk+/gtk-3-18] Check if XRRGetOutputInfo returned a null pointer.
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-18] Check if XRRGetOutputInfo returned a null pointer.
- Date: Thu, 10 Mar 2016 04:25:47 +0000 (UTC)
commit 3e624869d549f2a3fc5c55c3e0e6beedb89c2626
Author: fiddlerwoaroof <fiddlerwoaroof+gb gmail com>
Date: Thu Mar 3 10:30:00 2016 -0500
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.
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 b0c3cd6..5231474 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");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]