mirror of
https://github.com/GTNewHorizons/NotEnoughItems.git
synced 2026-11-23 13:39:53 +00:00
Fix NPE
This commit is contained in:
1 parent
87fcf80b8e
commit
479e53cfa5
1 file changed
+4
-2
@@ -129,8 +129,10 @@ public class ItemSorter implements Comparator<ItemStack>, ItemsLoadedCallback
|
||||
{
|
||||
@Override
|
||||
public int compare(ItemStack o1, ItemStack o2) {
|
||||
int order1 = instance.ordering.get(o1);
|
||||
int order2 = instance.ordering.get(o2);
|
||||
Integer order1 = instance.ordering.get(o1);
|
||||
Integer order2 = instance.ordering.get(o2);
|
||||
if(order1 == null) return order2 == null ? 0 : 1;
|
||||
if(order2 == null) return -1;
|
||||
return compareInt(order1, order2);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user