Skip to content
This repository has been archived by the owner on Nov 1, 2021. It is now read-only.

Commit

Permalink
backend/drm: check drm_surface_render_black_frame return value
Browse files Browse the repository at this point in the history
This avoids hitting an assertion in drm_fb_lock_surface when
we failed to render a black frame.
  • Loading branch information
emersion committed Nov 15, 2020
1 parent 213970e commit 2aac3c2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion backend/drm/drm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 2aac3c2

Please sign in to comment.