Fixing null error in NetworkManager

This commit is contained in:
Joe Bowser 2009-12-15 12:43:03 -08:00
parent 5fb6aa77b3
commit 3898130a30
2 changed files with 4 additions and 2 deletions

View File

@ -23,7 +23,9 @@ public class NetworkManager {
public boolean isAvailable() public boolean isAvailable()
{ {
NetworkInfo info = sockMan.getActiveNetworkInfo(); NetworkInfo info = sockMan.getActiveNetworkInfo();
boolean conn = info.isConnected(); boolean conn = false;
if(info != null)
conn = info.isConnected();
return conn; return conn;
} }

View File

@ -114,7 +114,7 @@ public class PhoneGap{
return version; return version;
} }
public void httpGet(String url, String file) public void httpGet(String url, String file)
/** /**
* grabs a file from specified url and saves it to a name and location * grabs a file from specified url and saves it to a name and location