apps/examples/wifi_manager_sample : fix crash when scan done
when scan is executed, if scan result is NULL, the crash has occurred.
@@ -346,6 +346,10 @@ void wm_scan_done(wifi_manager_scan_info_s **scan_result, wifi_manager_scan_resu
/* Make sure you copy the scan results onto a local data structure.
* It will be deleted soon eventually as you exit this function.
*/
+ if (scan_result == NULL) {
+ WM_TEST_SIGNAL;
+ return;
+ }
wifi_manager_scan_info_s *wifi_scan_iter = *scan_result;
while (wifi_scan_iter != NULL) {
printf("WiFi AP SSID: %-20s, WiFi AP BSSID: %-20s, WiFi Rssi: %d\n",
