drm_format_set_union: Require initialized dst and remove assert

This commit is contained in:
Alexander Orzechowski 2023-05-04 14:16:34 -04:00 committed by Simon Ser
parent d7917d2076
commit 1ee75786b4
3 changed files with 4 additions and 7 deletions

View file

@ -917,12 +917,9 @@ static bool set_default_feedback(struct wlr_linux_dmabuf_v1 *linux_dmabuf,
for (size_t i = 0; i < tranches_len; i++) {
const struct wlr_linux_dmabuf_feedback_v1_tranche *tranche = &tranches[i];
struct wlr_drm_format_set uni;
if (!wlr_drm_format_set_union(&uni, &formats, &tranche->formats)) {
if (!wlr_drm_format_set_union(&formats, &formats, &tranche->formats)) {
goto error_formats;
}
wlr_drm_format_set_finish(&formats);
formats = uni;
}
compiled_feedback_destroy(linux_dmabuf->default_feedback);