Skip to content

Commit

Permalink
fix: self-referencing menus result in stack overflow (#827)
Browse files Browse the repository at this point in the history
Closes: #826, #810
  • Loading branch information
bdunderscore committed Apr 16, 2024
1 parent a88385a commit 84ab43b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Editor/BuildContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ public VRCExpressionsMenu CloneMenu(VRCExpressionsMenu menu)

foreach (var control in newMenu.controls)
{
if (control.type == VRCExpressionsMenu.Control.ControlType.SubMenu)
if (control.type == VRCExpressionsMenu.Control.ControlType.SubMenu && control.subMenu != newMenu)
{
control.subMenu = CloneMenu(control.subMenu);
}
Expand Down

0 comments on commit 84ab43b

Please sign in to comment.