diff options
author | Simon Ser <contact@emersion.fr> | 2020-07-07 16:28:20 +0200 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2020-07-07 11:18:07 -0600 |
commit | b6377b59ff70342e4e33b67c9733fe80d7e87cac (patch) | |
tree | 97fa35ebb0a5e9626d36673454b2b3cfed5b5451 | |
parent | cccca368c595946235cdfb80a9d796ef5cb750fa (diff) |
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).
-rw-r--r-- | backend/drm/drm.c | 4 |
1 files changed, 3 insertions, 1 deletions
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; |