[gnome-control-center] network: Handle case where GtkComboBox has no active iter
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] network: Handle case where GtkComboBox has no active iter
- Date: Fri, 31 Jan 2020 14:19:29 +0000 (UTC)
commit 4897c6d8e3d35d50074e90fb1953728cb3680cb7
Author: Robert Ancell <robert ancell canonical com>
Date: Tue Dec 3 15:43:43 2019 +1300
network: Handle case where GtkComboBox has no active iter
panels/network/connection-editor/ce-page-security.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/panels/network/connection-editor/ce-page-security.c
b/panels/network/connection-editor/ce-page-security.c
index cc4182ff3..b8dc791a7 100644
--- a/panels/network/connection-editor/ce-page-security.c
+++ b/panels/network/connection-editor/ce-page-security.c
@@ -126,7 +126,8 @@ security_combo_get_active (CEPageSecurity *self)
WirelessSecurity *sec = NULL;
model = gtk_combo_box_get_model (self->security_combo);
- gtk_combo_box_get_active_iter (self->security_combo, &iter);
+ if (!gtk_combo_box_get_active_iter (self->security_combo, &iter))
+ return NULL;
gtk_tree_model_get (model, &iter, S_SEC_COLUMN, &sec, -1);
return sec;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]