Fixed a bug were AdvanceWifiSettings would crash on resume.

Bug: 17059286
Change-Id: I9c2b03806a45c739cfb4edf64a1518d60e74cdf5
diff --git a/src/com/android/settings/wifi/AdvancedWifiSettings.java b/src/com/android/settings/wifi/AdvancedWifiSettings.java
index 236aecd..a57097b 100644
--- a/src/com/android/settings/wifi/AdvancedWifiSettings.java
+++ b/src/com/android/settings/wifi/AdvancedWifiSettings.java
@@ -135,7 +135,9 @@
             wifiAssistant.setOnPreferenceChangeListener(this);
             wifiAssistant.setChecked(checked);
         } else {
-            getPreferenceScreen().removePreference(wifiAssistant);
+            if (wifiAssistant != null) {
+                getPreferenceScreen().removePreference(wifiAssistant);
+            }
         }
 
         Intent wifiDirectIntent = new Intent(context,