turbo-lab / android-beacon-mqtt

Simple android application for notifying MQTT server when iBeacon is in range or lost
GNU General Public License v3.0
27 stars 7 forks source link

Crash with empty MQTT settings. #7

Closed turbulator closed 5 years ago

turbulator commented 5 years ago

java.lang.NullPointerException: Attempt to invoke virtual method 'org.eclipse.paho.client.mqttv3.IMqttDeliveryToken org.eclipse.paho.android.service.MqttAndroidClient.publish(java.lang.String, org.eclipse.paho.client.mqttv3.MqttMessage)' on a null object reference at org.turbo.beaconmqtt.BeaconApplication.mqttPublish(BeaconApplication.java:388) at org.turbo.beaconmqtt.BeaconApplication.mqttPublishExitRegion(BeaconApplication.java:413) at org.turbo.beaconmqtt.BeaconApplication.didExitRegion(BeaconApplication.java:247) at org.altbeacon.beacon.IntentHandler.convertIntentsToCallbacks(IntentHandler.java:78) at org.altbeacon.beacon.BeaconLocalBroadcastProcessor$1.onReceive(BeaconLocalBroadcastProcessor.java:89) at android.support.v4.content.LocalBroadcastManager.executePendingBroadcasts(LocalBroadcastManager.java:313) at android.support.v4.content.LocalBroadcastManager$1.handleMessage(LocalBroadcastManager.java:121) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:176) at android.app.ActivityThread.main(ActivityThread.java:6635) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:823)

turbulator commented 5 years ago

Fixed in 0856e462acba44d1c1f1748ffc500fe3572b9575