diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c06dd39b..01c722ed8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ All notable changes to this project will be documented in this file. ### Fixed - [#1904] NullpointerException when renaming invalid identifiers in AS1/2 files caused by missing charset +- [#1904] NullpointerException when fast switching items ### Changed - Warning before switching deobfuscation is now optional diff --git a/src/com/jpexs/decompiler/flash/gui/ImagePanel.java b/src/com/jpexs/decompiler/flash/gui/ImagePanel.java index f27d9ed5a..775f0acce 100644 --- a/src/com/jpexs/decompiler/flash/gui/ImagePanel.java +++ b/src/com/jpexs/decompiler/flash/gui/ImagePanel.java @@ -473,7 +473,11 @@ public final class ImagePanel extends JPanel implements MediaDisplay { tim.schedule(new TimerTask() { @Override public void run() { - RECT rect = timelined.getRect(); + Timelined tim = timelined; + if (tim == null) { + return; + } + RECT rect = tim.getRect(); double zoomDouble = zoom.fit ? getZoomToFit() : zoom.value; double w = rect.getWidth() / SWF.unitDivisor * zoomDouble; double h = rect.getHeight() / SWF.unitDivisor * zoomDouble;