backend/drm: check drm_surface_make_current return value

drm_connector_set_cursor wasn't checking the return value of the
drm_surface_make_current call. On failure, this results in a failed
assertion in wlr_renderer_begin (because no rendering context is
current).
This commit is contained in:
Simon Ser 2020-07-07 16:28:20 +02:00 committed by Drew DeVault
parent cccca368c5
commit b6377b59ff
1 changed files with 3 additions and 1 deletions

View File

@ -928,7 +928,9 @@ static bool drm_connector_set_cursor(struct wlr_output *output,
return false;
}
drm_surface_make_current(&plane->surf, NULL);
if (!drm_surface_make_current(&plane->surf, NULL)) {
return false;
}
struct wlr_renderer *rend = plane->surf.renderer->wlr_rend;