Skip to content

Commit

Permalink
Add an additional null check to TransformKeyframeAnimation (#2381)
Browse files Browse the repository at this point in the history
Fixes #2354
  • Loading branch information
gpeal authored Sep 3, 2023
1 parent a097aa2 commit 5d3763a
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -221,15 +221,15 @@ public Matrix getMatrix() {
BaseKeyframeAnimation<ScaleXY, ScaleXY> scale = this.scale;
if (scale != null) {
ScaleXY scaleTransform = scale.getValue();
if (scaleTransform.getScaleX() != 1f || scaleTransform.getScaleY() != 1f) {
if (scaleTransform != null && (scaleTransform.getScaleX() != 1f || scaleTransform.getScaleY() != 1f)) {
matrix.preScale(scaleTransform.getScaleX(), scaleTransform.getScaleY());
}
}

BaseKeyframeAnimation<PointF, PointF> anchorPoint = this.anchorPoint;
if (anchorPoint != null) {
PointF anchorPointValue = anchorPoint.getValue();
if (anchorPointValue != null && anchorPointValue.x != 0 || anchorPointValue.y != 0) {
if (anchorPointValue != null && (anchorPointValue.x != 0 || anchorPointValue.y != 0)) {
matrix.preTranslate(-anchorPointValue.x, -anchorPointValue.y);
}
}
Expand Down

0 comments on commit 5d3763a

Please sign in to comment.