mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 11:32:04 +00:00
monitor-manager-xrandr: Don't try to disable disabled CRTC
When applying a configuration to XRANDR, we first disable CRTCs that happen to extend outside of the to-be X11 screen size. While doing so, we fail to actually check whether the CRTC is active or not, meaning we'll try to query the content of the CRTC configuration even though it has none, leading to a NULL pointer dereference. Fix this by simply ignoring non-configured CRTCs. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1093
This commit is contained in:
parent
fb81199dec
commit
9fa56176fd
@ -400,9 +400,13 @@ apply_crtc_assignments (MetaMonitorManager *manager,
|
||||
{
|
||||
MetaCrtcInfo *crtc_info = crtcs[i];
|
||||
MetaCrtc *crtc = crtc_info->crtc;
|
||||
MetaCrtcConfig *crtc_config = crtc->config;
|
||||
MetaCrtcConfig *crtc_config;
|
||||
int x2, y2;
|
||||
|
||||
crtc_config = crtc->config;
|
||||
if (!crtc_config)
|
||||
continue;
|
||||
|
||||
x2 = (int) roundf (crtc_config->layout.origin.x +
|
||||
crtc_config->layout.size.width);
|
||||
y2 = (int) roundf (crtc_config->layout.origin.y +
|
||||
|
Loading…
Reference in New Issue
Block a user