[gtk+] combobox: Don't allow an individual cell to cheat
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] combobox: Don't allow an individual cell to cheat
- Date: Thu, 22 Dec 2011 23:27:32 +0000 (UTC)
commit 9707d964f77a5d82f806b7fec3ac82f5996f967e
Author: Benjamin Otte <otte redhat com>
Date: Thu Dec 22 15:57:21 2011 +0100
combobox: Don't allow an individual cell to cheat
Make sure we only set sensitive when the cell is sensitive and visible.
Also avoid invalid memory accesses if no cells existed.
gtk/gtkcombobox.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtkcombobox.c b/gtk/gtkcombobox.c
index 79d5d27..4d7fd8a 100644
--- a/gtk/gtkcombobox.c
+++ b/gtk/gtkcombobox.c
@@ -3885,13 +3885,15 @@ gtk_combo_box_list_select_func (GtkTreeSelection *selection,
NULL);
if (cell_visible && cell_sensitive)
- break;
+ {
+ sensitive = TRUE;
+ break;
+ }
cell = cell->next;
}
- g_list_free (cells);
- sensitive = cell_sensitive;
+ g_list_free (cells);
}
g_list_free (columns);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]