mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-01 16:30:15 +00:00
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.
This commit is contained in:
parent
763daf4420
commit
f3f998efd7
@ -653,6 +653,9 @@ init_randr15 (GdkScreen *screen)
|
|||||||
XRRGetOutputInfo (x11_screen->xdisplay, resources, output);
|
XRRGetOutputInfo (x11_screen->xdisplay, resources, output);
|
||||||
GdkX11Monitor monitor;
|
GdkX11Monitor monitor;
|
||||||
|
|
||||||
|
if (output_info == NULL)
|
||||||
|
continue;
|
||||||
|
|
||||||
/* Non RandR1.2+ X driver have output name "default" */
|
/* Non RandR1.2+ X driver have output name "default" */
|
||||||
randr12_compat |= !g_strcmp0 (output_info->name, "default");
|
randr12_compat |= !g_strcmp0 (output_info->name, "default");
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user