We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 44c9b62 commit a16a1dfCopy full SHA for a16a1df
1 file changed
androidplot-core/src/main/java/com/androidplot/Plot.java
@@ -21,6 +21,7 @@
21
import android.graphics.*;
22
import android.os.Build;
23
import android.os.Looper;
24
+import android.support.annotation.Nullable;
25
import android.util.AttributeSet;
26
import android.util.Log;
27
import android.view.View;
@@ -804,7 +805,10 @@ protected void onDraw(Canvas canvas) {
804
805
* "heavy lifting".
806
* @param canvas
807
*/
- protected synchronized void renderOnCanvas(Canvas canvas) {
808
+ protected synchronized void renderOnCanvas(@Nullable Canvas canvas) {
809
+ if(canvas == null) {
810
+ return;
811
+ }
812
try {
813
// any series interested in synchronizing with plot should
814
// implement PlotListener.onBeforeDraw(...) and do a read lock from within its
0 commit comments