Skip to content

Commit e2c9f22

Browse files
committed
Fix a crash
1 parent 3bc194d commit e2c9f22

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

MPChartLib/src/main/java/com/github/mikephil/charting/renderer/PieChartRenderer.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,7 @@ public class PieChartRenderer extends DataRenderer {
7777
* Setter for the rounded corner slice paint object
7878
*/
7979
public void setRoundedCornerRadius(float radius){
80-
mRoundedCornerPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
81-
mRoundedCornerPaint.setStyle(Style.STROKE);
82-
mRoundedCornerPaint.setAntiAlias(true);
8380
mRoundedCornerPaint.setStrokeWidth(radius);
84-
8581
}
8682

8783
/**
@@ -120,6 +116,10 @@ public PieChartRenderer(PieChart chart, ChartAnimator animator,
120116

121117
mValueLinePaint = new Paint(Paint.ANTI_ALIAS_FLAG);
122118
mValueLinePaint.setStyle(Style.STROKE);
119+
120+
mRoundedCornerPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
121+
mRoundedCornerPaint.setStyle(Style.STROKE);
122+
mRoundedCornerPaint.setAntiAlias(true);
123123
}
124124

125125
public Paint getPaintHole() {

0 commit comments

Comments
 (0)