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;
} }