From b6377b59ff70342e4e33b67c9733fe80d7e87cac Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Tue, 7 Jul 2020 16:28:20 +0200 Subject: 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). --- backend/drm/drm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'backend/drm') diff --git a/backend/drm/drm.c b/backend/drm/drm.c index 7153761a..6978c22c 100644 --- a/backend/drm/drm.c +++ b/backend/drm/drm.c @@ -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; -- cgit v1.2.3