mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-02 11:55:59 +01:00
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.
This commit is contained in:
parent
c881008e1c
commit
eef8b3dde8
1 changed files with 3 additions and 1 deletions
|
@ -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
|
// drm_crtc_page_flip expects a FB to be available
|
||||||
struct wlr_drm_plane *plane = crtc->primary;
|
struct wlr_drm_plane *plane = crtc->primary;
|
||||||
if (!plane_get_next_fb(plane)->bo) {
|
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)) {
|
if (!drm_fb_lock_surface(&plane->pending_fb, &plane->surf)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue