Fix #538 Internal error when changing Catalogue page with no trades

This commit is contained in:
mezz committed 2015-03-02 23:55:58 -08:00
1 parent d30b2482df
commit 5802178bbd
1 file changed
+6
@@ -110,6 +110,9 @@ public class ContainerCatalogue extends Container implements IGuiSelectable {
return;
}
if (stations.size() == 0) {
return;
}
stationIndex = (stationIndex + 1) % stations.size();
updateTradeInfo();
}
@@ -120,6 +123,9 @@ public class ContainerCatalogue extends Container implements IGuiSelectable {
return;
}
if (stations.size() == 0) {
return;
}
stationIndex = (stationIndex - 1 + stations.size()) % stations.size();
updateTradeInfo();
}