From 603645e3cc3ee40e467ff0a43c5d2f5977178a92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jindra=20Pet=F8=EDk?= Date: Fri, 19 Jul 2013 13:05:22 +0200 Subject: [PATCH] morphshape fix --- .../jpexs/decompiler/flash/types/MORPHFILLSTYLE.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/trunk/src/com/jpexs/decompiler/flash/types/MORPHFILLSTYLE.java b/trunk/src/com/jpexs/decompiler/flash/types/MORPHFILLSTYLE.java index 6c5c82e72..b3352782e 100644 --- a/trunk/src/com/jpexs/decompiler/flash/types/MORPHFILLSTYLE.java +++ b/trunk/src/com/jpexs/decompiler/flash/types/MORPHFILLSTYLE.java @@ -77,13 +77,19 @@ public class MORPHFILLSTYLE implements NeedsCharacters { public FILLSTYLE getFillStyleAt(int ratio) { FILLSTYLE ret = new FILLSTYLE(); ret.bitmapId = bitmapId; - ret.bitmapMatrix = morphMatrix(startBitmapMatrix, endBitmapMatrix, ratio); - ret.colorA = MORPHGRADIENT.morphColor(startColor, endColor, ratio); + if (startBitmapMatrix != null) { + ret.bitmapMatrix = morphMatrix(startBitmapMatrix, endBitmapMatrix, ratio); + } + if (startColor != null) { + ret.colorA = MORPHGRADIENT.morphColor(startColor, endColor, ratio); + } ret.fillStyleType = fillStyleType; if (gradient != null) { ret.gradient = gradient.getGradientAt(ratio); } - ret.gradientMatrix = morphMatrix(startGradientMatrix, endGradientMatrix, ratio); + if (startGradientMatrix != null) { + ret.gradientMatrix = morphMatrix(startGradientMatrix, endGradientMatrix, ratio); + } return ret; }