Fix #135633: Freeze/crash using a specific Geometry Node group as modifier

`interface_input_index` was called for an output socket. Also filter out inputs
that aren't exposed in the modifier, similar to a few lines above.

Pull Request: https://projects.blender.org/blender/blender/pulls/135641
This commit is contained in:
Hans Goudey
2025-03-07 18:46:53 +01:00
committed by Hans Goudey
parent 967fb3ae4c
commit 3f87120ccf
@@ -2258,6 +2258,12 @@ static bool interface_panel_affects_output(DrawGroupInputsContext &ctx,
for (const bNodeTreeInterfaceItem *item : panel.items()) {
if (item->item_type == NODE_INTERFACE_SOCKET) {
const auto &socket = *reinterpret_cast<const bNodeTreeInterfaceSocket *>(item);
if (socket.flag & NODE_INTERFACE_SOCKET_HIDE_IN_MODIFIER) {
continue;
}
if (!(socket.flag & NODE_INTERFACE_SOCKET_INPUT)) {
continue;
}
const int input_index = ctx.nmd.node_group->interface_input_index(socket);
if (ctx.input_usages[input_index]) {
return true;