mirror of
https://bitbucket.org/projectswg/cucore.git
synced 2026-08-01 01:16:02 -04:00
Fixed modification exception being thrown when destroying items within a container
This commit is contained in:
@@ -260,9 +260,11 @@ public class ObjectManager extends Manager {
|
||||
destroyObject(slottedObj);
|
||||
}
|
||||
|
||||
for (SWGObject containedObj : object.getContainedObjects()) {
|
||||
if (containedObj != null)
|
||||
destroyObject(containedObj);
|
||||
Iterator<SWGObject> containerIterator = object.getContainedObjects().iterator();
|
||||
while(containerIterator.hasNext()) {
|
||||
SWGObject containedObject = containerIterator.next();
|
||||
if (containedObject != null)
|
||||
destroyObject(containedObject);
|
||||
}
|
||||
|
||||
// Remove object from the parent
|
||||
|
||||
Reference in New Issue
Block a user