amlcurran / ShowcaseView

[Archived] Highlight the best bits of your app to users quickly, simply, and cool...ly
5.6k stars 1.29k forks source link

setShowcase method crash #444

Open duz17 opened 7 years ago

duz17 commented 7 years ago

setShowcase method use post delay without null check, causing this crash:

Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.view.View.getLocationInWindow(int[])' on a null object reference at com.github.amlcurran.showcaseview.targets.ViewTarget.getPoint(ViewTarget.java:41) at com.github.amlcurran.showcaseview.ShowcaseView$1.run(ShowcaseView.java:191) at android.os.Handler.handleCallback(Handler.java:761) at android.os.Handler.dispatchMessage(Handler.java:98) at android.os.Looper.loop(Looper.java:156) at android.app.ActivityThread.main(ActivityThread.java:6523) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:941) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:831)