소스 검색

fixed empty tree .toString()

Nicolas Cannasse 10 년 전
부모
커밋
e13b381332
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      std/haxe/ds/BalancedTree.hx

+ 1 - 1
std/haxe/ds/BalancedTree.hx

@@ -203,7 +203,7 @@ class BalancedTree<K,V> {
 	}
 
 	public function toString() {
-		return '{${root.toString()}}';
+		return root == null ? '{}' : '{${root.toString()}}';
 	}
 }