From 167c17a29f1266403f1c87ced47b2e4a7ac612f5 Mon Sep 17 00:00:00 2001 From: chrisgregan Date: Wed, 13 Aug 2014 10:28:44 +0100 Subject: [PATCH] Null pointer check to prevent log errors --- Assets/Fungus/Editor/FungusScript/FungusCommandEditor.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Assets/Fungus/Editor/FungusScript/FungusCommandEditor.cs b/Assets/Fungus/Editor/FungusScript/FungusCommandEditor.cs index c03f7e7f..d410f314 100644 --- a/Assets/Fungus/Editor/FungusScript/FungusCommandEditor.cs +++ b/Assets/Fungus/Editor/FungusScript/FungusCommandEditor.cs @@ -14,7 +14,10 @@ namespace Fungus.Script void OnEnable() { FungusCommand t = target as FungusCommand; - t.hideFlags = HideFlags.HideInInspector; + if (t != null) + { + t.hideFlags = HideFlags.HideInInspector; + } } public override void OnInspectorGUI()