aboutsummaryrefslogtreecommitdiff
path: root/render/drm_format_set.c
diff options
context:
space:
mode:
authorAlexander Orzechowski <alex@ozal.ski>2023-05-11 14:43:22 -0400
committerAlexander Orzechowski <alex@ozal.ski>2023-05-11 14:43:22 -0400
commit47e175ae7ff562b680378914b8826bf0ffce8470 (patch)
tree9a14819d0341869f3df77d2e8358138cc03d961b /render/drm_format_set.c
parent300bd80772b7fc916275a04dd9c65a44a3c73741 (diff)
wlr_drm_format_set_intersect: Clear destination before trying to write to it
Diffstat (limited to 'render/drm_format_set.c')
-rw-r--r--render/drm_format_set.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/render/drm_format_set.c b/render/drm_format_set.c
index 5028c1ce..df3efd30 100644
--- a/render/drm_format_set.c
+++ b/render/drm_format_set.c
@@ -221,6 +221,7 @@ bool wlr_drm_format_set_intersect(struct wlr_drm_format_set *dst,
// When the two formats have no common modifier, keep
// intersecting the rest of the formats: they may be compatible
// with each other
+ out.formats[out.len] = (struct wlr_drm_format){0};
if (!wlr_drm_format_intersect(&out.formats[out.len],
&a->formats[i], &b->formats[j])) {
wlr_drm_format_set_finish(&out);