Gota
Gota copied to clipboard
Crash when listener is null
Caused
by java.lang.NullPointerException: Attempt to invoke interface method 'void net.alhazmy13.gota.a$b.a(int, net.alhazmy13.gota.b)' on a null object reference at net.alhazmy13.gota.GotaActivity.checkPermissions(GotaActivity.java:64) at net.alhazmy13.gota.GotaActivity.onCreate(GotaActivity.java:33) at android.app.Activity.performCreate(Activity.java:7365) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1218) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3137) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3279) at android.app.ActivityThread.-wrap12(Unknown Source) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1881) at android.os.Handler.dispatchMessage(Handler.java:108) at android.os.Looper.loop(Looper.java:166) at android.app.ActivityThread.main(ActivityThread.java:7406) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:245) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:926)`
Could you please add checking of the listener to not be null before calling Gota.listener.onRequestBack
in GotaActivity class.