mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-23 08:34:11 -08:00
Merge pull request #116 from shannah/fix_nullpointer_in_treemap
Fixed nullpointer when creating iterator on TreeMap where root node i…
This commit is contained in:
commit
7b87df417d
|
@ -691,7 +691,7 @@ public class TTreeMap<K, V> extends TAbstractMap<K, V> implements TCloneable, TS
|
||||||
public EntryIterator(TTreeMap<K, V> owner, TreeNode<K, V>[] path, TreeNode<K, V> to, boolean reverse) {
|
public EntryIterator(TTreeMap<K, V> owner, TreeNode<K, V>[] path, TreeNode<K, V> to, boolean reverse) {
|
||||||
this.owner = owner;
|
this.owner = owner;
|
||||||
modCount = owner.modCount;
|
modCount = owner.modCount;
|
||||||
this.path = TArrays.copyOf(path, owner.root.height);
|
this.path = TArrays.copyOf(path, owner.root == null ? 0 : owner.root.height);
|
||||||
depth = path.length;
|
depth = path.length;
|
||||||
this.to = to;
|
this.to = to;
|
||||||
this.reverse = reverse;
|
this.reverse = reverse;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user