Skip to content

Commit 6c54f0b

Browse files
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.
1 parent 0c919ab commit 6c54f0b

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎MPChartLib/src/main/java/com/github/mikephil/charting/jobs/AnimatedZoomJob.java‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ public static AnimatedZoomJob getInstance(ViewPortHandler viewPortHandler, View
3333
result.view = v;
3434
result.xOrigin = xOrigin;
3535
result.yOrigin = yOrigin;
36+
result.yAxis = axis;
37+
result.xAxisRange = xAxisRange;
3638
result.resetAnimator();
3739
result.animator.setDuration(duration);
3840
return result;

0 commit comments

Comments
 (0)