Fix NPE from duplicating TranslatableComponent
This commit is contained in:
parent
fa3678bcdd
commit
40c0618a3a
@ -41,9 +41,15 @@ public class TranslatableComponent extends BaseComponent
|
||||
{
|
||||
super( original );
|
||||
setTranslate( original.getTranslate() );
|
||||
for ( BaseComponent baseComponent : original.getWith() )
|
||||
|
||||
if ( original.getWith() != null )
|
||||
{
|
||||
with.add( baseComponent.duplicate() );
|
||||
List<BaseComponent> temp = new ArrayList<BaseComponent>();
|
||||
for ( BaseComponent baseComponent : original.getWith() )
|
||||
{
|
||||
temp.add( baseComponent.duplicate() );
|
||||
}
|
||||
setWith( temp );
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user