Fix NPE in WifiScanningService

Fixes: 29924121

Change-Id: Iabb8111d0d4cdef6b02710f6ea2b3545f1b6d70b
diff --git a/service/java/com/android/server/wifi/scanner/WifiScanningServiceImpl.java b/service/java/com/android/server/wifi/scanner/WifiScanningServiceImpl.java
index b98b4d1..7024e3b 100644
--- a/service/java/com/android/server/wifi/scanner/WifiScanningServiceImpl.java
+++ b/service/java/com/android/server/wifi/scanner/WifiScanningServiceImpl.java
@@ -701,6 +701,9 @@
             }
 
             if (settings.hiddenNetworkIds != null) {
+                if (mActiveScanSettings.hiddenNetworkIds == null) {
+                    return false;
+                }
                 Set<Integer> activeHiddenNetworkIds = new HashSet<>();
                 for (int id : mActiveScanSettings.hiddenNetworkIds) {
                     activeHiddenNetworkIds.add(id);