#2458: Fix NPE when using null in tab list methods

This commit is contained in:
Lucas Dallabona 2018-07-13 00:33:05 -03:00 committed by md_5
parent b1cc72e212
commit ab810744ec

View File

@ -51,7 +51,7 @@ public final class ChatComponentTransformer
*/
public BaseComponent[] transform(ProxiedPlayer player, BaseComponent... component)
{
if ( component == null || component.length < 1 )
if ( component == null || component.length < 1 || ( component.length == 1 && component[0] == null ) )
{
return new BaseComponent[]
{