Fixes nullPointer in GuiGrid ?

Think instead of all these null checks, maybe not set that list from the network packet as that is another thread, and instead set a temporary list that the gui forground then pull into the main list before rendering.
This commit is contained in:
tomevoll
2016-03-28 08:20:05 +02:00
parent b3ef81b9c2
commit ac930f0d45

View File

@@ -133,7 +133,9 @@ public class GuiGrid extends GuiBase {
for (int i = 0; i < 9 * getVisibleRows(); ++i) {
if (slot < items.size()) {
int qty = items.get(slot).getQuantity();
StorageItem storageItem = items.get(slot);
if(storageItem == null) continue;
int qty = storageItem.getQuantity();
String text;