From 3898130a30430da02f8634b2fccb6a7f69425183 Mon Sep 17 00:00:00 2001 From: Joe Bowser Date: Tue, 15 Dec 2009 12:43:03 -0800 Subject: [PATCH] Fixing null error in NetworkManager --- framework/src/com/phonegap/NetworkManager.java | 4 +++- framework/src/com/phonegap/PhoneGap.java | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/framework/src/com/phonegap/NetworkManager.java b/framework/src/com/phonegap/NetworkManager.java index da8f1f1f..2925c69c 100644 --- a/framework/src/com/phonegap/NetworkManager.java +++ b/framework/src/com/phonegap/NetworkManager.java @@ -23,7 +23,9 @@ public class NetworkManager { public boolean isAvailable() { NetworkInfo info = sockMan.getActiveNetworkInfo(); - boolean conn = info.isConnected(); + boolean conn = false; + if(info != null) + conn = info.isConnected(); return conn; } diff --git a/framework/src/com/phonegap/PhoneGap.java b/framework/src/com/phonegap/PhoneGap.java index 1ee55019..f03a9dc2 100644 --- a/framework/src/com/phonegap/PhoneGap.java +++ b/framework/src/com/phonegap/PhoneGap.java @@ -114,7 +114,7 @@ public class PhoneGap{ return version; } - + public void httpGet(String url, String file) /** * grabs a file from specified url and saves it to a name and location