Merge "Fix NPE due to delayed event handling."

This commit is contained in:
Amith Yamasani
2012-04-24 11:53:31 -07:00
committed by Android (Google) Code Review

View File

@@ -527,6 +527,9 @@ public class WifiSettings extends SettingsPreferenceFragment
* the strength of network and the security for it.
*/
private void updateAccessPoints() {
// Safeguard from some delayed event handling
if (getActivity() == null) return;
final int wifiState = mWifiManager.getWifiState();
switch (wifiState) {