$OpenBSD: patch-src_gsb_form_widget_c,v 1.1 2013/04/27 13:02:08 landry Exp $
http://permalink.gmane.org/gmane.linux.grisbi.devel.french/8671
Fix a crasher in gsb_form_widget_free_list when exiting
--- src/gsb_form_widget.c.orig	Sat Apr 27 12:50:02 2013
+++ src/gsb_form_widget.c	Sat Apr 27 12:49:39 2013
@@ -99,6 +99,7 @@ GSList *gsb_form_widget_get_list ( void )
 gboolean gsb_form_widget_free_list ( void )
 {
     GSList *tmp_list;
+    GtkWidget *widget_signals;
 
     devel_debug (NULL);
 
@@ -120,6 +121,35 @@ gboolean gsb_form_widget_free_list ( void )
         {
             if (GTK_IS_WIDGET (element -> element_widget))
             {
+                widget_signals = NULL;
+                if ( GTK_IS_ENTRY ( element -> element_widget ) )
+                {
+                    widget_signals = element -> element_widget;
+                }
+                else if ( GTK_IS_COMBOFIX ( element -> element_widget ) )
+                {
+                    widget_signals = GTK_COMBOFIX ( element -> element_widget ) -> entry;
+                }
+
+                if ( widget_signals )
+                {
+                    g_signal_handlers_disconnect_by_func ( G_OBJECT ( widget_signals ),
+                        G_CALLBACK ( gsb_form_entry_get_focus ),
+                        GINT_TO_POINTER ( element -> element_number ));
+                    g_signal_handlers_disconnect_by_func ( G_OBJECT ( widget_signals ),
+                        G_CALLBACK ( gsb_form_entry_lose_focus ),
+                        GINT_TO_POINTER ( element -> element_number ));
+                    g_signal_handlers_disconnect_by_func ( G_OBJECT ( widget_signals ),
+                        G_CALLBACK ( gsb_form_button_press_event ),
+                        GINT_TO_POINTER ( element -> element_number ));
+                    g_signal_handlers_disconnect_by_func ( G_OBJECT ( widget_signals ),
+                        G_CALLBACK ( gsb_form_key_press_event ),
+                        GINT_TO_POINTER ( element -> element_number ));
+                    g_signal_handlers_disconnect_by_func ( G_OBJECT ( widget_signals ),
+                        G_CALLBACK ( gsb_form_combo_selection_changed ),
+                        GINT_TO_POINTER ( element -> element_number ));
+                }
+
                 /* if there is something in the combofix we destroy, the popup will
                  * be showed because destroying the gtk_entry will erase it directly,
                  * so the simpliest way to avoid that is to erase now the entry, but with
