diff options
author | Scott Anderson <ascent12@hotmail.com> | 2017-12-06 17:32:32 +1300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-06 17:32:32 +1300 |
commit | dad19394cf5501f95c1df1d71de42a654f748e08 (patch) | |
tree | bfafdf7b8619d0ed186db083031dd3c616e511e7 /backend/drm | |
parent | 314e80e8db425fb5ea15c70df4edfcf154fcef43 (diff) | |
parent | 8af779fae610a86c6757eb4614cace39f687c292 (diff) |
Merge pull request #463 from emersion/fix-hw-cursor-move-segfault
Fix segfault when moving hardware cursor
Diffstat (limited to 'backend/drm')
-rw-r--r-- | backend/drm/drm.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/backend/drm/drm.c b/backend/drm/drm.c index dd247998..9fcf2ad7 100644 --- a/backend/drm/drm.c +++ b/backend/drm/drm.c @@ -634,8 +634,10 @@ static bool wlr_drm_connector_move_cursor(struct wlr_output *output, struct wlr_box transformed_box; wlr_output_transform_apply_to_box(transform, &box, &transformed_box); - transformed_box.x -= plane->cursor_hotspot_x; - transformed_box.y -= plane->cursor_hotspot_y; + if (plane != NULL) { + transformed_box.x -= plane->cursor_hotspot_x; + transformed_box.y -= plane->cursor_hotspot_y; + } return drm->iface->crtc_move_cursor(drm, conn->crtc, transformed_box.x, transformed_box.y); |