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:
Dan Williams
2006-01-03 19:06:37 +00:00
parent d23aba6524
commit c9a7797a60

View File

@@ -137,8 +137,8 @@ static WirelessSecurityOption * get_active_option_from_combo (GtkComboBox *combo
model = gtk_combo_box_get_model (combo);
g_assert (model);
gtk_combo_box_get_active_iter (combo, &iter);
gtk_tree_model_get (model, &iter, NAME_COLUMN, &str, OPT_COLUMN, &opt, -1);
if (gtk_combo_box_get_active_iter (combo, &iter))
gtk_tree_model_get (model, &iter, NAME_COLUMN, &str, OPT_COLUMN, &opt, -1);
return opt;
}