diff --git a/jme3-core/src/main/java/com/jme3/scene/control/UpdateControl.java b/jme3-core/src/main/java/com/jme3/scene/control/UpdateControl.java index 8e276c32f..aa84faf1c 100644 --- a/jme3-core/src/main/java/com/jme3/scene/control/UpdateControl.java +++ b/jme3-core/src/main/java/com/jme3/scene/control/UpdateControl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2018 jMonkeyEngine + * Copyright (c) 2009-2019 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -54,7 +54,7 @@ import java.util.concurrent.Future; */ public class UpdateControl extends AbstractControl { - private final ConcurrentLinkedQueue> taskQueue = new ConcurrentLinkedQueue>(); + private ConcurrentLinkedQueue> taskQueue = new ConcurrentLinkedQueue<>(); /** * Enqueues a task/callable object to execute in the jME3 @@ -87,6 +87,7 @@ public class UpdateControl extends AbstractControl { @Override public Object jmeClone() { UpdateControl clone = (UpdateControl)super.jmeClone(); + clone.taskQueue = new ConcurrentLinkedQueue<>(); // This is kind of questionable since the tasks aren't cloned and have // no reference to the new spatial or anything. They'll get run again