@@ -246,16 +246,18 @@ protected void renderPoints(Canvas canvas, RectF plotArea, XYSeries series, int
246246 final PointLabeler pointLabeler = hasPointLabelFormatter ? formatter .getPointLabeler () : null ;
247247 for (int i = iStart ; i < iEnd ; i ++) {
248248 PointF p = points .get (i );
249+ if (p != null ) {
249250
250- // if vertexPaint is available, draw vertex:
251- if (vertexPaint != null ) {
252- canvas .drawPoint (p .x , p .y , vertexPaint );
253- }
251+ // if vertexPaint is available, draw vertex:
252+ if (vertexPaint != null ) {
253+ canvas .drawPoint (p .x , p .y , vertexPaint );
254+ }
254255
255- // if textPaint and pointLabeler are available, draw point's text label:
256- if (pointLabeler != null ) {
257- canvas .drawText (pointLabeler .getLabel (series , i ),
258- p .x + plf .hOffset , p .y + plf .vOffset , plf .getTextPaint ());
256+ // if textPaint and pointLabeler are available, draw point's text label:
257+ if (pointLabeler != null ) {
258+ canvas .drawText (pointLabeler .getLabel (series , i ),
259+ p .x + plf .hOffset , p .y + plf .vOffset , plf .getTextPaint ());
260+ }
259261 }
260262 }
261263 }
0 commit comments