mirror of
https://github.com/apache/cordova-android.git
synced 2025-02-26 20:33:07 +08:00
Fix NPE on reset with undefined NetworkListener.
This commit is contained in:
parent
7e3af6c235
commit
2cd3ebc7a8
@ -135,10 +135,14 @@ public class GeoBroker extends Plugin {
|
|||||||
* Stop listener.
|
* Stop listener.
|
||||||
*/
|
*/
|
||||||
public void onDestroy() {
|
public void onDestroy() {
|
||||||
this.networkListener.destroy();
|
if (this.networkListener != null) {
|
||||||
this.gpsListener.destroy();
|
this.networkListener.destroy();
|
||||||
this.networkListener = null;
|
this.networkListener = null;
|
||||||
this.gpsListener = null;
|
}
|
||||||
|
if (this.gpsListener != null) {
|
||||||
|
this.gpsListener.destroy();
|
||||||
|
this.gpsListener = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user