Skip to content

Commit

Permalink
Check for Null
Browse files Browse the repository at this point in the history
  • Loading branch information
AlienXAXS committed Jul 24, 2024
1 parent 2df976f commit 595bb19
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion NebulaWorld/UIPlayerList/UIPlayerWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@ public void OnInit()
{
var parent = UIRoot.instance.uiGame.inventoryWindow.transform.parent;
var chatGo = parent.Find("Chat Window") ? parent.Find("Chat Window").gameObject : null;
_chatWindow = chatGo.transform.GetComponentInChildren<ChatWindow>();

if (chatGo != null)
{
_chatWindow = chatGo.transform.GetComponentInChildren<ChatWindow>();
}
}

public void Update()
Expand Down

0 comments on commit 595bb19

Please sign in to comment.