[gnumeric] fix warning on NULL expr_top



commit 6ff908a87aa6c57892b88c7616944f2f828a289e
Author: Andreas J Guelzow <aguelzow pyrshep ca>
Date:   Fri Jul 30 11:51:01 2010 -0600

    fix warning on NULL expr_top
    
    2010-07-30  Andreas J. Guelzow <aguelzow pyrshep ca>
    
    	* gnumeric-expr-entry.c (gee_finalize): fix warning on NULL expr_top

 src/widgets/ChangeLog             |    4 ++++
 src/widgets/gnumeric-expr-entry.c |    3 ++-
 2 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/src/widgets/ChangeLog b/src/widgets/ChangeLog
index 3f5c38b..e871d45 100644
--- a/src/widgets/ChangeLog
+++ b/src/widgets/ChangeLog
@@ -1,5 +1,9 @@
 2010-07-30  Andreas J. Guelzow <aguelzow pyrshep ca>
 
+	* gnumeric-expr-entry.c (gee_finalize): fix warning on NULL expr_top
+
+2010-07-30  Andreas J. Guelzow <aguelzow pyrshep ca>
+
 	* gnumeric-expr-entry.c (gee_scan_for_range): use the saved expr_top
 	(gee_update_lexer_items): new
 	(gee_duplicate_lexer_items): new
diff --git a/src/widgets/gnumeric-expr-entry.c b/src/widgets/gnumeric-expr-entry.c
index 40cbb5d..ff245a0 100644
--- a/src/widgets/gnumeric-expr-entry.c
+++ b/src/widgets/gnumeric-expr-entry.c
@@ -1401,7 +1401,8 @@ gee_finalize (GObject *obj)
 	go_format_unref (gee->constant_format);
 	gee_delete_tooltip (gee, TRUE);
 	g_free (gee->lexer_items);
-	gnm_expr_top_unref (gee->texpr);
+	if (gee->texpr != NULL)
+		gnm_expr_top_unref (gee->texpr);
 
 	((GObjectClass *)parent_class)->finalize (obj);
 }



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