evince r2930 - in trunk: . shell



Author: carlosgc
Date: Wed Feb 27 17:32:52 2008
New Revision: 2930
URL: http://svn.gnome.org/viewvc/evince?rev=2930&view=rev

Log:
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


Modified:
   trunk/ChangeLog
   trunk/shell/ev-view.c

Modified: trunk/shell/ev-view.c
==============================================================================
--- trunk/shell/ev-view.c	(original)
+++ trunk/shell/ev-view.c	Wed Feb 27 17:32:52 2008
@@ -1907,7 +1907,8 @@
 		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,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]