diff options
author | Drew DeVault <sir@cmpwn.com> | 2019-02-18 15:22:49 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-18 15:22:49 -0500 |
commit | 93c8b91b05c44a0d477e323b6dc0a6a6219209c8 (patch) | |
tree | 4d6e297dc44aa6f247647a5d4d286e770d7b8ecb /backend | |
parent | fd0b625ab96bc3c54ba01a7a610b53b441236728 (diff) | |
parent | 2a738803b2dfb45b5289540c31dacde56a04885c (diff) |
Merge pull request #1558 from emersion/fix-hide-cursor-mgpu
backend/drm: fix NULL dereference when unsetting cursor
Diffstat (limited to 'backend')
-rw-r--r-- | backend/drm/drm.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/backend/drm/drm.c b/backend/drm/drm.c index 635a78e2..e0eed4c2 100644 --- a/backend/drm/drm.c +++ b/backend/drm/drm.c @@ -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; - - if (drm->parent) { - bo = copy_drm_surface_mgpu(&plane->mgpu_surf, plane->surf.back); + if (bo && drm->parent) { + bo = copy_drm_surface_mgpu(&plane->mgpu_surf, bo); } if (bo) { |