From c638fbfa69eb1ac2aa68805ba860c933c31072fc Mon Sep 17 00:00:00 2001 From: Brock Whitten Date: Tue, 16 Feb 2010 10:28:07 -0800 Subject: [PATCH] Fixing nulls --- framework/src/com/phonegap/GeoListener.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/framework/src/com/phonegap/GeoListener.java b/framework/src/com/phonegap/GeoListener.java index 45267b6b..c9c8f3b0 100644 --- a/framework/src/com/phonegap/GeoListener.java +++ b/framework/src/com/phonegap/GeoListener.java @@ -66,8 +66,10 @@ public class GeoListener { // This stops the listener void stop() { - mGps.stop(); - mNetwork.stop(); + if(mGps != null) + mGps.stop(); + if(mNetwork != null) + mNetwork.stop(); } public Location getCurrentLocation() {