summaryrefslogtreecommitdiff
path: root/netspeed
diff options
context:
space:
mode:
authorrbuj <[email protected]>2021-01-05 09:54:49 +0100
committerRobert Antoni Buj Gelonch <[email protected]>2021-01-06 19:24:02 +0100
commite71981acd4039b286e93678d521c0f8be6567e15 (patch)
tree53bd679e409d03efa82d47cd54ffde84251f27fa /netspeed
parentabb00f11a4b8cda9e3dc9c34c6cd61fea725a45c (diff)
downloadmate-applets-e71981acd4039b286e93678d521c0f8be6567e15.tar.bz2
mate-applets-e71981acd4039b286e93678d521c0f8be6567e15.tar.xz
netspeed: avoid a NULL pointer dereference
Diffstat (limited to 'netspeed')
-rw-r--r--netspeed/src/netspeed-preferences.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/netspeed/src/netspeed-preferences.c b/netspeed/src/netspeed-preferences.c
index ac2d78b9..401a9de8 100644
--- a/netspeed/src/netspeed-preferences.c
+++ b/netspeed/src/netspeed-preferences.c
@@ -134,7 +134,7 @@ on_network_device_combo_changed (GtkComboBox *combo,
for (i = 1; i < active; i++) {
devices = g_list_next (devices);
}
- if (g_str_equal (devices->data, current_device_name))
+ if (!devices || !g_strcmp0 (devices->data, current_device_name))
return;
g_settings_set_string (preferences->settings,
"device", devices->data);