From e71981acd4039b286e93678d521c0f8be6567e15 Mon Sep 17 00:00:00 2001 From: rbuj Date: Tue, 5 Jan 2021 09:54:49 +0100 Subject: netspeed: avoid a NULL pointer dereference --- netspeed/src/netspeed-preferences.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- cgit v1.2.1