Fix NPE on reset with undefined NetworkListener.

This commit is contained in:
Braden Shepherdson 2012-09-24 14:36:29 -04:00
parent 7e3af6c235
commit 2cd3ebc7a8

View File

@ -135,11 +135,15 @@ public class GeoBroker extends Plugin {
* Stop listener. * Stop listener.
*/ */
public void onDestroy() { public void onDestroy() {
if (this.networkListener != null) {
this.networkListener.destroy(); this.networkListener.destroy();
this.gpsListener.destroy();
this.networkListener = null; this.networkListener = null;
}
if (this.gpsListener != null) {
this.gpsListener.destroy();
this.gpsListener = null; this.gpsListener = null;
} }
}
/** /**
* Called when the view navigates. * Called when the view navigates.