diff --git a/Controllers/NodeTreeController.cs b/Controllers/NodeTreeController.cs index 66c0fca..8f608f2 100644 --- a/Controllers/NodeTreeController.cs +++ b/Controllers/NodeTreeController.cs @@ -183,13 +183,13 @@ namespace NBTExplorer.Controllers public void CreateNode (TagType type) { - if (_nodeTree.Nodes == null || _nodeTree.Nodes.Count == 0) + if (SelectedNode == null || _nodeTree.Nodes.Count == 0) return; - if (_nodeTree.SelectedNode == null) + if (SelectedNode == null) CreateNode(_nodeTree.Nodes[0], type); else - CreateNode(_nodeTree.SelectedNode, type); + CreateNode(SelectedNode, type); } public void DeleteNode (TreeNode node)