[gtk+] Check if XRRGetOutputInfo returned a null pointer.
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Check if XRRGetOutputInfo returned a null pointer.
- Date: Fri, 4 Mar 2016 02:31:43 +0000 (UTC)
commit f3f998efd7538a338ca2959c21a93ec633e17737
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 82b8aa2..063b597 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]