Fix: Geometry Nodes: Leak of 4+ items of enum
There is extra one user of shared enum definition in case this is new one so already exist user is enough. Also using of `new` operator to construct enum definition make this impossible to catch such leask for trivial type. `Vector` have 4-element inline buffer so this was trivial case for <=4 items. Pull Request: https://projects.blender.org/blender/blender/pulls/117599
This commit is contained in:
committed by
Lukas Tönne
parent
8102c86c6e
commit
fb7f29c98e
@@ -822,6 +822,8 @@ class NodeTreeMainUpdater {
|
||||
bNodeSocket &input = *node->input_sockets()[0];
|
||||
BLI_assert(input.is_available() && input.type == SOCK_MENU);
|
||||
this->set_enum_ptr(*input.default_value_typed<bNodeSocketValueMenu>(), enum_items);
|
||||
/* Remove initial user. */
|
||||
enum_items->remove_user_and_delete_if_last();
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user