nodeparamviewitem: fix regression crash on array append command

This commit is contained in:
itsmattkc
2023-02-21 21:08:35 -08:00
parent 1781311e6f
commit e859ba51f0
@@ -444,7 +444,7 @@ void NodeParamViewItemBody::ArrayAppendClicked()
for (auto it=array_ui_.cbegin(); it!=array_ui_.cend(); it++) { for (auto it=array_ui_.cbegin(); it!=array_ui_.cend(); it++) {
if (it.value().append_btn == sender()) { if (it.value().append_btn == sender()) {
NodeInput real_input = NodeGroup::ResolveInput(NodeInput(it.key().node, it.key().input)); NodeInput real_input = NodeGroup::ResolveInput(NodeInput(it.key().node, it.key().input));
Core::instance()->undo_stack()->push(new NodeArrayInsertCommand(real_input.node(), real_input.input(), real_input.GetArraySize()+1)); Core::instance()->undo_stack()->push(new NodeArrayInsertCommand(real_input.node(), real_input.input(), real_input.GetArraySize()));
break; break;
} }
} }