Ver Fonte

fix bug on removeChild()

bstouls há 9 anos atrás
pai
commit
4499982f58
1 ficheiros alterados com 1 adições e 1 exclusões
  1. 1 1
      hxd/inspect/TreeNode.hx

+ 1 - 1
hxd/inspect/TreeNode.hx

@@ -28,7 +28,7 @@ class TreeNode extends Node {
 	override function removeChild(n:Node) {
 		super.removeChild(n);
 		n.j.detach();
-		if( jchild.get().numChildren == 0 ) {
+		if( jchild != null && jchild.get().numChildren == 0 ) {
 			jchild.remove();
 			jchild = null;
 		}