mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-22 12:55:58 +01:00
render/drm_format_set: Clean up on union failure
If drm_format_set_extend fails, we need to make sure each wlr_drm_format is cleaned up together with the formats array. Finish the set to take care of it.
This commit is contained in:
parent
484a87ce61
commit
73dd934794
1 changed files with 3 additions and 4 deletions
|
@ -271,10 +271,9 @@ bool wlr_drm_format_set_union(struct wlr_drm_format_set *dst,
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add both a and b sets into out
|
// Add both a and b sets into out
|
||||||
if (!drm_format_set_extend(&out, a)) {
|
if (!drm_format_set_extend(&out, a) ||
|
||||||
return false;
|
!drm_format_set_extend(&out, b)) {
|
||||||
}
|
wlr_drm_format_set_finish(&out);
|
||||||
if (!drm_format_set_extend(&out, b)) {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue