Fixed NullPointer

This commit is contained in:
Jindra Pet��k
2014-02-02 04:58:12 +01:00
parent 664fca494a
commit 30c913949a
@@ -131,8 +131,12 @@ public final class ImagePanel extends JPanel implements ActionListener, FlashDis
img = drawable.toImage(0, swf.tags, characters, new Stack<Integer>(), Matrix.getScaleInstance(1 / SWF.unitDivisor));
SWF.putToCache(key, img);
}
mat.translate(img.bounds.getMinX(), img.bounds.getMinY());
setImage(img);
if (img != null && img.bounds != null && mat != null) {
mat.translate(img.bounds.getMinX(), img.bounds.getMinY());
}
if (img != null) {
setImage(img);
}
return;
}
play();