Merge pull request #6586 from deathbeam/properly-null-check-chat-perf

Properly null-check chat performance widgets
This commit is contained in:
Adam
2018-11-19 21:06:33 -05:00
committed by GitHub

View File

@@ -61,9 +61,16 @@ public class ChatboxPerformancePlugin extends Plugin
{
return true;
}
Widget[] widgets = widget.getChildren();
return widgets.length > 0 && widgets[widgets.length - 1].getOpacity() < 254;
if (widgets != null && widgets.length > 0)
{
Widget last = widgets[widgets.length - 1];
return last != null && last.getOpacity() < 254;
}
return false;
}
private void fixChatbox()