aboutsummaryrefslogtreecommitdiff
path: root/backend/drm
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2020-07-07 16:28:20 +0200
committerDrew DeVault <sir@cmpwn.com>2020-07-07 11:18:07 -0600
commitb6377b59ff70342e4e33b67c9733fe80d7e87cac (patch)
tree97fa35ebb0a5e9626d36673454b2b3cfed5b5451 /backend/drm
parentcccca368c595946235cdfb80a9d796ef5cb750fa (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).
Diffstat (limited to 'backend/drm')
-rw-r--r--backend/drm/drm.c4
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;