summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiří Klimeš <jklimes@redhat.com>2013-04-11 15:29:12 +0200
committerJiří Klimeš <jklimes@redhat.com>2013-04-11 15:29:12 +0200
commitfa20c8081998822bd374f3d24e8102720ec351c3 (patch)
treef41002b801b0595faf716897eeb819318082f2b9
parent302e8ccab076eb19b631c7238420119419b1dd7b (diff)
downloadNetworkManager-fa20c8081998822bd374f3d24e8102720ec351c3.tar.gz
wifi: fix NM crash on mode == NULL
caused by 53d8f49bcd2a2a49fd01e56321527cd2480014e7
-rw-r--r--src/nm-device-wifi.c6
1 files 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 */