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).
master
Simon Ser 5 years ago committed by Drew DeVault
parent cccca368c5
commit b6377b59ff

@ -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;

Loading…
Cancel
Save