plattysoft / Leonids

A Particle System for standard Android UI: http://plattysoft.github.io/Leonids/
Apache License 2.0
2.28k stars 397 forks source link

Crash detected in onUpdate(long miliseconds) function #118

Open PratikPsb99 opened 1 year ago

PratikPsb99 commented 1 year ago

private void onUpdate(long miliseconds) { ............. mDrawingView.postInvalidate(); }

this mDrawingView.postInvalidate(); causing crash sometimes.

This issue is detected in firebase crashlytics. Here I am attaching the error also which is detected by firebase.

Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.view.View.postInvalidate()' on a null object reference at com.plattysoft.leonids.ParticleSystem.onUpdate(:89) at com.plattysoft.leonids.ParticleSystem.access$100() at com.plattysoft.leonids.ParticleSystem$ParticleTimerTask.run(:20) at java.util.TimerThread.mainLoop(Timer.java:563) at java.util.TimerThread.run(Timer.java:513)