Skip to content

Commit

Permalink
Fixed TextAdapter to handle null text GameObject
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisgregan committed Jan 1, 2019
1 parent 2a7432c commit 60c3d5d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Assets/Fungus/Scripts/Utils/TextAdapter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ public class TextAdapter : IWriterTextDestination

public void InitFromGameObject(GameObject go, bool includeChildren = false)
{
if (go == null)
{
return;
}

if (!includeChildren)
{
textUI = go.GetComponent<Text>();
Expand Down

0 comments on commit 60c3d5d

Please sign in to comment.