Fixed Grid crash with search history, fixes #1393

This commit is contained in:
raoulvdberge
2017-08-08 10:20:19 +02:00
parent 54c12f5652
commit 22e9f929d5
2 changed files with 6 additions and 5 deletions

View File

@@ -6,6 +6,7 @@
- Added CTM integration for Disk Manipulator (raoulvdberge)
- Fixed possible rare dupe bug with Importer (raoulvdberge)
- Fixed Shulker Box dupe bug with Destructor (raoulvdberge)
- Fixed Grid crash with search history (raoulvdberge)
### 1.5.14
- Updated Forge to 2426 (raoulvdberge)

View File

@@ -14,11 +14,7 @@ import com.raoulvdberge.refinedstorage.container.ContainerGrid;
import com.raoulvdberge.refinedstorage.gui.GuiBase;
import com.raoulvdberge.refinedstorage.gui.Scrollbar;
import com.raoulvdberge.refinedstorage.gui.grid.filtering.GridFilterParser;
import com.raoulvdberge.refinedstorage.gui.grid.sorting.GridSorting;
import com.raoulvdberge.refinedstorage.gui.grid.sorting.GridSortingID;
import com.raoulvdberge.refinedstorage.gui.grid.sorting.GridSortingInventoryTweaks;
import com.raoulvdberge.refinedstorage.gui.grid.sorting.GridSortingName;
import com.raoulvdberge.refinedstorage.gui.grid.sorting.GridSortingQuantity;
import com.raoulvdberge.refinedstorage.gui.grid.sorting.*;
import com.raoulvdberge.refinedstorage.gui.grid.stack.GridStackFluid;
import com.raoulvdberge.refinedstorage.gui.grid.stack.GridStackItem;
import com.raoulvdberge.refinedstorage.gui.grid.stack.IGridStack;
@@ -651,6 +647,10 @@ public class GuiGrid extends GuiBase implements IGridDisplay {
}
private void updateSearchHistory(int delta) {
if (SEARCH_HISTORY.isEmpty()) {
return;
}
if (searchHistory == -1) {
searchHistory = SEARCH_HISTORY.size();
}