File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
androidplot-core/src/main/java/com/androidplot Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 2121import android .graphics .*;
2222import android .os .Build ;
2323import android .os .Looper ;
24+ import android .support .annotation .Nullable ;
2425import android .util .AttributeSet ;
2526import android .util .Log ;
2627import android .view .View ;
@@ -804,7 +805,10 @@ protected void onDraw(Canvas canvas) {
804805 * "heavy lifting".
805806 * @param canvas
806807 */
807- protected synchronized void renderOnCanvas (Canvas canvas ) {
808+ protected synchronized void renderOnCanvas (@ Nullable Canvas canvas ) {
809+ if (canvas == null ) {
810+ return ;
811+ }
808812 try {
809813 // any series interested in synchronizing with plot should
810814 // implement PlotListener.onBeforeDraw(...) and do a read lock from within its
You can’t perform that action at this time.
0 commit comments