OSDN Git Service

fixed a possible crash on WifiStateTracker
authorYi Sun <beyounn@gmail.com>
Thu, 6 Aug 2009 01:42:52 +0000 (18:42 -0700)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Fri, 29 Oct 2010 07:45:10 +0000 (15:45 +0800)
wifi/java/android/net/wifi/WifiStateTracker.java

index 26c848d..e0b4245 100644 (file)
@@ -1272,6 +1272,8 @@ public class WifiStateTracker extends NetworkStateTracker {
      */
     public void resetConnections(boolean disableInterface) {
         if (LOCAL_LOGD) Log.d(TAG, "Reset connections and stopping DHCP");
+        if (mInterfaceName == null)
+            return;
         mHaveIpAddress = false;
         mObtainingIpAddress = false;
         mWifiInfo.setIpAddress(0);