Fix NPE due to delayed event handling.

a.k.a., annoying monkeys.

Bug: 6336430
Change-Id: Ie038a71d0ae66b3f30ccd704529f767fa2058542
This commit is contained in:
Amith Yamasani
2012-04-24 11:35:38 -07:00
parent e2b3370876
commit 9da80a90be

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) {