diff options
author | Simon Ser <contact@emersion.fr> | 2020-08-14 12:04:29 +0200 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2020-11-15 22:48:42 +0100 |
commit | eef8b3dde8cda28a97ad36a602554e0ecf9819dd (patch) | |
tree | 9f27945119346ee89d9eaab370fe9a6235cb98e9 | |
parent | c881008e1c73cc75ed32ce034e622092684295e1 (diff) |
backend/drm: check drm_surface_render_black_frame return value
This avoids hitting an assertion in drm_fb_lock_surface when
we failed to render a black frame.
-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 95f8c3d0..dd3e9c71 100644 --- a/backend/drm/drm.c +++ b/backend/drm/drm.c @@ -681,7 +681,9 @@ static bool drm_connector_pageflip_renderer(struct wlr_drm_connector *conn) { // drm_crtc_page_flip expects a FB to be available struct wlr_drm_plane *plane = crtc->primary; if (!plane_get_next_fb(plane)->bo) { - drm_surface_render_black_frame(&plane->surf); + if (!drm_surface_render_black_frame(&plane->surf)) { + return false; + } if (!drm_fb_lock_surface(&plane->pending_fb, &plane->surf)) { return false; } |