Skip to content
This repository has been archived by the owner on Feb 11, 2022. It is now read-only.

null point exception in the ConnectivityReceiver #2

Closed
ouchadam opened this issue May 15, 2013 · 0 comments
Closed

null point exception in the ConnectivityReceiver #2

ouchadam opened this issue May 15, 2013 · 0 comments

Comments

@ouchadam
Copy link
Contributor

peekService(context, new Intent(context, MerlinService.class)) can return null if the service is not running

05-15 10:52:09.047: ERROR/AndroidRuntime(1635): FATAL EXCEPTION: main
java.lang.RuntimeException: Unable to start receiver com.novoda.merlin.receiver.ConnectivityReceiver: java.lang.NullPointerException
at android.app.ActivityThread.handleReceiver(ActivityThread.java:2383)
at android.app.ActivityThread.access$1500(ActivityThread.java:141)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1310)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5039)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
at com.novoda.merlin.receiver.ConnectivityReceiver.getMerlinService(ConnectivityReceiver.java:34)
at com.novoda.merlin.receiver.ConnectivityReceiver.notifyMerlinService(ConnectivityReceiver.java:29)
at com.novoda.merlin.receiver.ConnectivityReceiver.onReceive(ConnectivityReceiver.java:19)
at android.app.ActivityThread.handleReceiver(ActivityThread.java:2376)
... 10 more

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant