diff options
author | Alexander Orzechowski <alex@ozal.ski> | 2023-05-04 14:16:34 -0400 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2023-05-04 18:19:33 +0000 |
commit | 1ee75786b40e3cf51428fe1a4fb67e09be163537 (patch) | |
tree | d53fcf945dcec41b553022c44cb41eb1f23a9091 /render/drm_format_set.c | |
parent | d7917d20762f85d58e5d8db7f19aec6be3e9ed56 (diff) |
drm_format_set_union: Require initialized dst and remove assert
Diffstat (limited to 'render/drm_format_set.c')
-rw-r--r-- | render/drm_format_set.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/render/drm_format_set.c b/render/drm_format_set.c index c8611755..464c0fb4 100644 --- a/render/drm_format_set.c +++ b/render/drm_format_set.c @@ -258,8 +258,6 @@ static bool drm_format_set_extend(struct wlr_drm_format_set *dst, bool wlr_drm_format_set_union(struct wlr_drm_format_set *dst, const struct wlr_drm_format_set *a, const struct wlr_drm_format_set *b) { - assert(dst != a && dst != b); - struct wlr_drm_format_set out = {0}; out.capacity = a->len + b->len; out.formats = calloc(out.capacity, sizeof(struct wlr_drm_format *)); @@ -276,6 +274,7 @@ bool wlr_drm_format_set_union(struct wlr_drm_format_set *dst, return false; } + wlr_drm_format_set_finish(dst); *dst = out; return true; |