Don't segfault if the active iter is invalid for some reason
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1257 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
@@ -137,8 +137,8 @@ static WirelessSecurityOption * get_active_option_from_combo (GtkComboBox *combo
|
|||||||
|
|
||||||
model = gtk_combo_box_get_model (combo);
|
model = gtk_combo_box_get_model (combo);
|
||||||
g_assert (model);
|
g_assert (model);
|
||||||
gtk_combo_box_get_active_iter (combo, &iter);
|
if (gtk_combo_box_get_active_iter (combo, &iter))
|
||||||
gtk_tree_model_get (model, &iter, NAME_COLUMN, &str, OPT_COLUMN, &opt, -1);
|
gtk_tree_model_get (model, &iter, NAME_COLUMN, &str, OPT_COLUMN, &opt, -1);
|
||||||
|
|
||||||
return opt;
|
return opt;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user