Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell/ev-view.c
diff options
context:
space:
mode:
authorCarlos Garcia Campos <carlosgc@gnome.org>2008-02-27 17:32:52 (GMT)
committer Carlos Garcia Campos <carlosgc@src.gnome.org>2008-02-27 17:32:52 (GMT)
commitd1b42341039d4e26cf299c2fc50d36cd18760011 (patch)
treec1f1c2f07576c524330750d0ada4a18a82e83597 /shell/ev-view.c
parent1aa84014113a4c139d31e4da47616cd097fc7348 (diff)
Fix a crash when a choice form field doesn't have any item selected. Fixes
2008-02-27 Carlos Garcia Campos <carlosgc@gnome.org> * shell/ev-view.c: (ev_view_form_field_choice_changed): Fix a crash when a choice form field doesn't have any item selected. Fixes bug #518831 svn path=/trunk/; revision=2930
Diffstat (limited to 'shell/ev-view.c')
-rw-r--r--shell/ev-view.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/shell/ev-view.c b/shell/ev-view.c
index dc1d190..3b7a60d 100644
--- a/shell/ev-view.c
+++ b/shell/ev-view.c
@@ -1907,7 +1907,8 @@ ev_view_form_field_choice_changed (GtkWidget *widget,
gint item;
item = gtk_combo_box_get_active (GTK_COMBO_BOX (widget));
- if (GPOINTER_TO_INT (field_choice->selected_items->data) != item) {
+ if (!field_choice->selected_items ||
+ GPOINTER_TO_INT (field_choice->selected_items->data) != item) {
g_list_free (field_choice->selected_items);
field_choice->selected_items = NULL;
field_choice->selected_items = g_list_prepend (field_choice->selected_items,