From 60c3d5d356aff2803b256d4e3a0e84868f382c6a Mon Sep 17 00:00:00 2001 From: Chris Gregan Date: Tue, 1 Jan 2019 10:53:30 +0000 Subject: [PATCH] Fixed TextAdapter to handle null text GameObject --- Assets/Fungus/Scripts/Utils/TextAdapter.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Assets/Fungus/Scripts/Utils/TextAdapter.cs b/Assets/Fungus/Scripts/Utils/TextAdapter.cs index df169f01..6139c4af 100644 --- a/Assets/Fungus/Scripts/Utils/TextAdapter.cs +++ b/Assets/Fungus/Scripts/Utils/TextAdapter.cs @@ -18,6 +18,11 @@ namespace Fungus public void InitFromGameObject(GameObject go, bool includeChildren = false) { + if (go == null) + { + return; + } + if (!includeChildren) { textUI = go.GetComponent();