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 );
|
super( original );
|
||||||
setTranslate( original.getTranslate() );
|
setTranslate( original.getTranslate() );
|
||||||
|
|
||||||
|
if ( original.getWith() != null )
|
||||||
|
{
|
||||||
|
List<BaseComponent> temp = new ArrayList<BaseComponent>();
|
||||||
for ( BaseComponent baseComponent : original.getWith() )
|
for ( BaseComponent baseComponent : original.getWith() )
|
||||||
{
|
{
|
||||||
with.add( baseComponent.duplicate() );
|
temp.add( baseComponent.duplicate() );
|
||||||
|
}
|
||||||
|
setWith( temp );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user