ProfileManagerService: Don't kill the entire system if WifiManager is null

Change-Id: I53ceed998c19e956df75dcffe08449714172c8be
diff --git a/lineage/lib/main/java/org/lineageos/platform/internal/ProfileTriggerHelper.java b/lineage/lib/main/java/org/lineageos/platform/internal/ProfileTriggerHelper.java
index 09e4fc4..2d3fd4d 100644
--- a/lineage/lib/main/java/org/lineageos/platform/internal/ProfileTriggerHelper.java
+++ b/lineage/lib/main/java/org/lineageos/platform/internal/ProfileTriggerHelper.java
@@ -189,10 +189,10 @@
     }
 
     private String getActiveSSID() {
-        WifiInfo wifiinfo = mWifiManager.getConnectionInfo();
-        if (wifiinfo == null) {
-            return null;
+        if (mWifiManager != null) {
+            WifiInfo wifiinfo = mWifiManager.getConnectionInfo();
+            return wifiinfo != null ? removeDoubleQuotes(wifiinfo.getSSID()) : null;
         }
-        return removeDoubleQuotes(wifiinfo.getSSID());
+        return null;
     }
 }