Fix statistics gui crashing when handling input events (#5435)

This commit is contained in:
Merlin Addams 2019-02-06 23:12:15 +00:00 committed by LexManos
parent 71dd5c9f4d
commit febae7f8f2

View file

@ -0,0 +1,12 @@
--- a/net/minecraft/client/gui/achievement/GuiStats.java
+++ b/net/minecraft/client/gui/achievement/GuiStats.java
@@ -118,8 +118,8 @@
public void func_193026_g() {
if (this.field_146543_v) {
this.func_193028_a();
- this.func_193029_f();
this.field_146545_u = this.field_146550_h;
+ this.func_193029_f(); //Forge: Bugfix, initButtons adds displaySlot to children, so set it first to prevent NPE
this.field_146543_v = false;
}