Autoselect first tab when no tab is selected. (pt. 2)

This commit is contained in:
raoulvdberge
2018-07-02 22:59:00 +02:00
parent 929a7d671d
commit d49ac4b9c9

View File

@@ -205,7 +205,11 @@ public class GuiCraftingMonitor extends GuiBase implements IResizableDisplay {
Optional<UUID> currentTab = craftingMonitor.getTabSelected();
if (currentTab.isPresent()) {
return getTabById(currentTab.get());
IGridTab tab = getTabById(currentTab.get());
if (tab != null) {
return tab;
}
}
if (tasks.isEmpty()) {