Fix: Crash in interface layout when using custom nodes
`node_socket_add_tooltip_in_node_editor` doesn't set a free function. but uiLayoutSetTooltipFunc didn't check on it. Documentation states that the free_arg parameter is optional. Pull Request: https://projects.blender.org/blender/blender/pulls/122115
This commit is contained in:
committed by
Jeroen Bakker
parent
d1516a44f2
commit
eb20f30e15
@@ -6039,7 +6039,7 @@ void uiLayoutSetTooltipFunc(uiLayout *layout,
|
||||
}
|
||||
}
|
||||
|
||||
if (!arg_used) {
|
||||
if (free_arg != nullptr && !arg_used) {
|
||||
/* Free the original copy of arg in case the layout is empty. */
|
||||
free_arg(arg);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user