Properly null-check chat performance widgets
Closes #6575 Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user