mirror of
https://github.com/slint-ui/slint.git
synced 2025-07-24 13:35:00 +00:00
vtable: Fix mismatch in new/delete size
When the component is smaller than the layout
This commit is contained in:
parent
5ee506e0a8
commit
73e970b8ca
1 changed files with 1 additions and 0 deletions
|
@ -101,6 +101,7 @@ public:
|
|||
{
|
||||
if (!--inner->strong_ref) {
|
||||
Layout layout = inner->vtable->drop_in_place({ inner->vtable, &inner->data });
|
||||
layout.size = std::max<size_t>(layout.size, sizeof(Layout)); // because of the union
|
||||
layout.size += inner->data_offset;
|
||||
layout.align = std::max<size_t>(layout.align, alignof(VRcInner<VTable, Dyn>));
|
||||
inner->layout = layout;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue