mirror of
https://github.com/apache/cordova-android.git
synced 2025-01-31 17:32:51 +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.
|
||||
*/
|
||||
public void onDestroy() {
|
||||
this.networkListener.destroy();
|
||||
this.gpsListener.destroy();
|
||||
this.networkListener = null;
|
||||
this.gpsListener = null;
|
||||
if (this.networkListener != null) {
|
||||
this.networkListener.destroy();
|
||||
this.networkListener = null;
|
||||
}
|
||||
if (this.gpsListener != null) {
|
||||
this.gpsListener.destroy();
|
||||
this.gpsListener = null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user