空のSubMenuがあるとMenuInstallerの表示でエラーが発生するのを修正 (#282)

This commit is contained in:
Hitsub 2023-04-20 17:33:04 +09:00 committed by GitHub
parent 5d11e98956
commit 1901035fd8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -469,7 +469,7 @@ namespace nadena.dev.modular_avatar.core.editor
_avatarMenus.Add(menu); _avatarMenus.Add(menu);
foreach (var subMenu in menu.controls) foreach (var subMenu in menu.controls)
{ {
if (subMenu.type == VRCExpressionsMenu.Control.ControlType.SubMenu) if (subMenu.type == VRCExpressionsMenu.Control.ControlType.SubMenu && subMenu.subMenu != null)
{ {
queue.Enqueue(subMenu.subMenu); queue.Enqueue(subMenu.subMenu);
} }