mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-26 06:35:58 +01:00
backend/drm: fix NULL dereference when unsetting cursor
This segfault happens on multi-GPU systems. Fixes https://github.com/swaywm/sway/issues/3717
This commit is contained in:
parent
fd0b625ab9
commit
2a738803b2
1 changed files with 2 additions and 3 deletions
|
@ -720,9 +720,8 @@ static bool drm_connector_set_cursor(struct wlr_output *output,
|
||||||
}
|
}
|
||||||
|
|
||||||
struct gbm_bo *bo = plane->cursor_enabled ? plane->surf.back : NULL;
|
struct gbm_bo *bo = plane->cursor_enabled ? plane->surf.back : NULL;
|
||||||
|
if (bo && drm->parent) {
|
||||||
if (drm->parent) {
|
bo = copy_drm_surface_mgpu(&plane->mgpu_surf, bo);
|
||||||
bo = copy_drm_surface_mgpu(&plane->mgpu_surf, plane->surf.back);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bo) {
|
if (bo) {
|
||||||
|
|
Loading…
Reference in a new issue