mirror of
https://github.com/ProjectSWGCore/Holocore.git
synced 2026-07-14 00:03:01 -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