Don't crash if the active_row reference has become invalid. (#157156,

2004-11-03  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkcombobox.c (gtk_combo_box_get_active): Don't crash
	if the active_row reference has become invalid.  (#157156,
	Christophe Fergeau)
This commit is contained in:
Matthias Clasen 2004-11-03 06:16:43 +00:00 committed by Matthias Clasen
parent a781654839
commit f41c59cce3
5 changed files with 31 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2004-11-03 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkcombobox.c (gtk_combo_box_get_active): Don't crash
if the active_row reference has become invalid. (#157156,
Christophe Fergeau)
2004-11-02 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkwindow.c (gtk_window_activate_key_after): As

View File

@ -1,3 +1,9 @@
2004-11-03 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkcombobox.c (gtk_combo_box_get_active): Don't crash
if the active_row reference has become invalid. (#157156,
Christophe Fergeau)
2004-11-02 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkwindow.c (gtk_window_activate_key_after): As

View File

@ -1,3 +1,9 @@
2004-11-03 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkcombobox.c (gtk_combo_box_get_active): Don't crash
if the active_row reference has become invalid. (#157156,
Christophe Fergeau)
2004-11-02 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkwindow.c (gtk_window_activate_key_after): As

View File

@ -1,3 +1,9 @@
2004-11-03 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkcombobox.c (gtk_combo_box_get_active): Don't crash
if the active_row reference has become invalid. (#157156,
Christophe Fergeau)
2004-11-02 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkwindow.c (gtk_window_activate_key_after): As

View File

@ -4212,8 +4212,13 @@ gtk_combo_box_get_active (GtkComboBox *combo_box)
{
GtkTreePath *path;
path = gtk_tree_row_reference_get_path (combo_box->priv->active_row);
result = gtk_tree_path_get_indices (path)[0];
gtk_tree_path_free (path);
if (path == NULL)
result = -1;
else
{
result = gtk_tree_path_get_indices (path)[0];
gtk_tree_path_free (path);
}
}
else
result = -1;