File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
src/main/java/mchorse/metamorph/client/gui Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -3,5 +3,5 @@ version=1.2.9
33mclib =2.3.1
44
55mc_version =1.12.2
6- forge_version =14.23.2.2611
6+ forge_version =14.23.5.2799
77snapshot =snapshot_20171003
Original file line number Diff line number Diff line change 1414
1515public class GuiMorphs extends GuiScrollElement
1616{
17+ private static final MorphCategory EMPTY_CATEGORY = new MorphCategory (null , null );
18+
1719 /**
1820 * Cached previous filter. Used for avoiding double recalculations
1921 */
@@ -105,7 +107,7 @@ else if (y > 0 && this.isLastCategory(this.selected))
105107 }
106108
107109 section = this .sections .get (sectionIndex );
108- category = section .section .categories .get (section .section .categories .size () - 1 );
110+ category = section .section .categories .isEmpty () ? EMPTY_CATEGORY : section . section . categories . get (section .section .categories .size () - 1 );
109111 }
110112 else if (index >= section .section .categories .size ())
111113 {
@@ -117,7 +119,7 @@ else if (index >= section.section.categories.size())
117119 }
118120
119121 section = this .sections .get (sectionIndex );
120- category = section .section .categories .get (0 );
122+ category = section .section .categories .isEmpty () ? EMPTY_CATEGORY : section . section . categories . get (0 );
121123 }
122124 else
123125 {
You can’t perform that action at this time.
0 commit comments