[gnumeric] fix criticals



commit 6602aef43a5cc8d2fb8772502ea18e4fdd8a3deb
Author: Andreas J Guelzow <aguelzow pyrshep ca>
Date:   Mon Jun 14 16:47:40 2010 -0600

    fix criticals
    
    2010-06-14  Andreas J. Guelzow <aguelzow pyrshep ca>
    
    	* gnumeric-expr-entry.c (gee_delete_tooltip): watch
    	  for disappearing entries
    	(cb_gee_key_press_event): gee_set_tooltip will ref the fd

 src/widgets/ChangeLog             |    6 ++++++
 src/widgets/gnumeric-expr-entry.c |    4 +---
 2 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/src/widgets/ChangeLog b/src/widgets/ChangeLog
index 5a037ff..31aa59c 100644
--- a/src/widgets/ChangeLog
+++ b/src/widgets/ChangeLog
@@ -1,5 +1,11 @@
 2010-06-14  Andreas J. Guelzow <aguelzow pyrshep ca>
 
+	* gnumeric-expr-entry.c (gee_delete_tooltip): watch 
+	  for disappearing entries 
+	(cb_gee_key_press_event): gee_set_tooltip will ref the fd
+	
+2010-06-14  Andreas J. Guelzow <aguelzow pyrshep ca>
+
 	* gnumeric-expr-entry.c (_GnmExprEntry): add field
 	(gee_init): initalize new field
 	(gee_delete_tooltip): disconnect handler
diff --git a/src/widgets/gnumeric-expr-entry.c b/src/widgets/gnumeric-expr-entry.c
index 7566b29..b423489 100644
--- a/src/widgets/gnumeric-expr-entry.c
+++ b/src/widgets/gnumeric-expr-entry.c
@@ -591,7 +591,7 @@ gee_delete_tooltip (GnmExprEntry *gee)
 		gnm_func_unref (gee->tooltip.fd);
 		gee->tooltip.fd = NULL;
 	}
-	if (gee->tooltip.handlerid != 0) {
+	if (gee->tooltip.handlerid != 0 && gee->entry != NULL) {
 		g_signal_handler_disconnect (gtk_widget_get_toplevel 
 					     (GTK_WIDGET (gee->entry)),
 					     gee->tooltip.handlerid);
@@ -918,10 +918,8 @@ cb_gee_key_press_event (GtkEntry	*entry,
 		
 		if (prefix < str_end) {
 			GnmFunc	   *fd = gnm_func_lookup (prefix, NULL);
-			gnm_func_ref (fd);
 			if (fd != NULL)
 				gee_set_tooltip (gee, fd);
-			gnm_func_unref (fd);
 		}
 
 		g_free (str);



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