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,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;
}
}
/**