mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-05-31 19:54:37 +00:00
Fixed ConcurrentModificationException in getCharacters on exit
This commit is contained in:
@@ -33,6 +33,7 @@ All notable changes to this project will be documented in this file.
|
||||
- [#1877] Recalculate dependent characters and frames on removing / editing item
|
||||
- DefineShape4 SVG import NullPointerException
|
||||
- List of objects under cursor and coordinates not showing
|
||||
- ConcurrentModificationException in getCharacters on exit
|
||||
|
||||
### Changed
|
||||
- GFX - DefineExternalImage2 no longer handled as character
|
||||
|
||||
@@ -368,6 +368,9 @@ public final class SWF implements SWFContainerItem, Timelined {
|
||||
@Internal
|
||||
private Map<String, ASMSource> asmsCache;
|
||||
|
||||
@Internal
|
||||
private boolean destroyed = false;
|
||||
|
||||
private Set<Integer> cyclicCharacters = null;
|
||||
|
||||
private boolean headerModified = false;
|
||||
@@ -415,6 +418,7 @@ public final class SWF implements SWFContainerItem, Timelined {
|
||||
}
|
||||
|
||||
public void clearTagSwfs() {
|
||||
destroyed = true;
|
||||
decompilerPool.destroySwf(this);
|
||||
resetTimelines(this);
|
||||
updateCharacters();
|
||||
@@ -485,10 +489,13 @@ public final class SWF implements SWFContainerItem, Timelined {
|
||||
di.getChildInfos().clear();
|
||||
}
|
||||
|
||||
public Map<Integer, CharacterTag> getCharacters() {
|
||||
public Map<Integer, CharacterTag> getCharacters() {
|
||||
if (characters == null) {
|
||||
synchronized (this) {
|
||||
if (characters == null) {
|
||||
if (destroyed) {
|
||||
return new HashMap<>();
|
||||
}
|
||||
Map<Integer, CharacterTag> chars = new HashMap<>();
|
||||
Map<Integer, List<CharacterIdTag>> charIdtags = new HashMap<>();
|
||||
Map<Integer, DefineExternalImage2> eimages = new HashMap<>();
|
||||
|
||||
Reference in New Issue
Block a user