diff options
author | Ray Strode <rstrode@redhat.com> | 2004-10-01 16:11:15 +0000 |
---|---|---|
committer | Ray Strode <halfline@src.gnome.org> | 2004-10-01 16:11:15 +0000 |
commit | a1ef49ea65626c551bb2b6f5a1c888d57fd3aae7 (patch) | |
tree | c63f81e25f8f78b9a0ded7cd64ba0283799e6a94 /gui | |
parent | 47936d8a5a3b1f410073b8e27ccfad580f8c890c (diff) | |
download | gdm-a1ef49ea65626c551bb2b6f5a1c888d57fd3aae7.tar.gz |
Ensure that selection iterator is valid before using it.
Fri Oct 01 12:07:18 2004 Ray Strode <rstrode@redhat.com>
* gui/greeter/greeter_action_language.c (selection_changed):
Ensure that selection iterator is valid before using it.
Diffstat (limited to 'gui')
-rw-r--r-- | gui/greeter/greeter_action_language.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gui/greeter/greeter_action_language.c b/gui/greeter/greeter_action_language.c index 76d0382f..c87e2624 100644 --- a/gui/greeter/greeter_action_language.c +++ b/gui/greeter/greeter_action_language.c @@ -158,9 +158,11 @@ selection_changed (GtkTreeSelection *selection, { GtkTreeIter iter; - gtk_tree_selection_get_selected (selection, NULL, &iter); - g_free (dialog_selected_language); - gtk_tree_model_get (GTK_TREE_MODEL (lang_model), &iter, LOCALE_COLUMN, &dialog_selected_language, -1); + if (gtk_tree_selection_get_selected (selection, NULL, &iter)) + { + g_free (dialog_selected_language); + gtk_tree_model_get (GTK_TREE_MODEL (lang_model), &iter, LOCALE_COLUMN, &dialog_selected_language, -1); + } } static void |