mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-22 12:55:58 +01:00
backend/drm: handle drm_surface_blit errors
drm_surface_blit returns NULL on error. This can happen e.g. when the source buffer cannot be imported into EGL. Closes: https://github.com/swaywm/wlroots/issues/3154
This commit is contained in:
parent
7df2ae88fa
commit
5aa5137fae
1 changed files with 3 additions and 0 deletions
|
@ -414,6 +414,9 @@ static bool drm_connector_set_pending_fb(struct wlr_drm_connector *conn,
|
|||
}
|
||||
|
||||
local_buf = drm_surface_blit(&plane->mgpu_surf, state->buffer);
|
||||
if (local_buf == NULL) {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
local_buf = wlr_buffer_lock(state->buffer);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue