Browse Source

Null pointer check to prevent log errors

master
chrisgregan 11 years ago
parent
commit
167c17a29f
  1. 5
      Assets/Fungus/Editor/FungusScript/FungusCommandEditor.cs

5
Assets/Fungus/Editor/FungusScript/FungusCommandEditor.cs

@ -14,7 +14,10 @@ namespace Fungus.Script
void OnEnable() void OnEnable()
{ {
FungusCommand t = target as FungusCommand; FungusCommand t = target as FungusCommand;
t.hideFlags = HideFlags.HideInInspector; if (t != null)
{
t.hideFlags = HideFlags.HideInInspector;
}
} }
public override void OnInspectorGUI() public override void OnInspectorGUI()

Loading…
Cancel
Save