From fa20c8081998822bd374f3d24e8102720ec351c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Klime=C5=A1?= Date: Thu, 11 Apr 2013 15:29:12 +0200 Subject: [PATCH] wifi: fix NM crash on mode == NULL caused by 53d8f49bcd2a2a49fd01e56321527cd2480014e7 --- src/nm-device-wifi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/nm-device-wifi.c b/src/nm-device-wifi.c index bdc444c0e6..a39e18c7c4 100644 --- a/src/nm-device-wifi.c +++ b/src/nm-device-wifi.c @@ -1132,11 +1132,11 @@ check_connection_available (NMDevice *device, NMConnection *connection) s_wifi = nm_connection_get_setting_wireless (connection); - /* Ad-Hoc connections are always available because they may be started - * at any time. + /* Ad-Hoc and AP connections are always available because they may be + * started at any time. */ mode = nm_setting_wireless_get_mode (s_wifi); - if (g_str_equal (mode, "adhoc") || g_str_equal (mode, "ap")) + if (g_strcmp0 (mode, "adhoc") == 0 || g_strcmp0 (mode, "ap") == 0) return TRUE; /* Hidden SSIDs obviously don't always appear in the scan list either */