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:
Simon Ser 2021-09-01 22:06:50 +02:00
parent 7df2ae88fa
commit 5aa5137fae
1 changed files with 3 additions and 0 deletions

View File

@ -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);
}