wifi: avoid assertion in request_wireless_scan() passing NULL to nm_utils_ssid_to_utf8()

(cherry picked from commit 7f8149bdb7)
This commit is contained in:
Thomas Haller 2015-04-23 12:59:01 +02:00
parent fe6889f7b1
commit 1e5d009367

View file

@ -1508,7 +1508,9 @@ request_wireless_scan (gpointer user_data)
for (i = 0; i < ssids->len; i++) {
ssid = g_ptr_array_index (ssids, i);
foo = nm_utils_ssid_to_utf8 (ssid->data, ssid->len);
foo = ssid->len > 0
? nm_utils_ssid_to_utf8 (ssid->data, ssid->len)
: NULL;
_LOGD (LOGD_WIFI_SCAN, "(%d) probe scanning SSID '%s'",
i, foo ? foo : "<hidden>");
g_free (foo);