Fix for missing setters in getInstance method

The zoomAndCenterAnimated method in BarLineChartBase crashes with a NullPointer exception because the yAxis variable is null when onAnimationUpdate is called. The yAxis is null because of missing setters in the getInstance method of AnimatedZoomJob.
This commit is contained in:
Stephen McBride 2017-02-28 15:58:42 +13:00 committed by GitHub
parent 0c919ab02d
commit 6c54f0b0a9

View file

@ -33,6 +33,8 @@ public class AnimatedZoomJob extends AnimatedViewPortJob implements Animator.Ani
result.view = v;
result.xOrigin = xOrigin;
result.yOrigin = yOrigin;
result.yAxis = axis;
result.xAxisRange = xAxisRange;
result.resetAnimator();
result.animator.setDuration(duration);
return result;