Merge pull request #1558 from emersion/fix-hide-cursor-mgpu

backend/drm: fix NULL dereference when unsetting cursor
This commit is contained in:
Drew DeVault 2019-02-18 15:22:49 -05:00 committed by GitHub
commit 93c8b91b05
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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) {