Skip to content

Commit 7071737

Browse files
committed
Minor refactor changes
1 parent 7c2d655 commit 7071737

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

Assets/Editor Toolbox/Editor/ToolboxEditorToolbar.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,13 @@ private static IEnumerator Initialize()
8686
var toolbarRightZone = states.AtIndex(1);
8787
AddIMGUIContainer(toolbarRightZone, OnGuiRight, "Editor Toolbox Right Area");
8888

89-
void AddIMGUIContainer(VisualElement parentElement, Action guiCallback, string name)
89+
static void AddIMGUIContainer(VisualElement parentElement, Action guiCallback, string name)
9090
{
91+
if (parentElement == null)
92+
{
93+
return;
94+
}
95+
9196
var element = new VisualElement();
9297
element.name = name;
9398
element.StretchToParentSize();

0 commit comments

Comments
 (0)