[gnumeric] Fix test suite failure.



commit 9a41531b8bf67bbffdc06c19cd7d1eec913d1de5
Author: Morten Welinder <terra gnome org>
Date:   Fri Apr 17 15:21:52 2009 -0400

    Fix test suite failure.
---
 ChangeLog      |    4 ++++
 src/commands.c |   20 ++++++++------------
 2 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 1dfd2db..e448218 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2009-04-17  Morten Welinder  <terra gnome org>
 
+	* src/commands.c (cmd_so_set_frame_label_finalize,
+	cmd_so_set_checkbox_finalize): Don't NULL-check before g_free.
+	Test suite passes again.
+
 	* src/print-info.c (load_range): Take Sheet argument too and
 	supply it to the parser.  All callers changed.
 	(print_info_new): Take Sheet argument too.  All callers changed.
diff --git a/src/commands.c b/src/commands.c
index 10b6e26..4286e73 100644
--- a/src/commands.c
+++ b/src/commands.c
@@ -7098,14 +7098,12 @@ cmd_so_set_frame_label_finalize (GObject *cmd)
 {
 	CmdSOSetFrameLabel *me = CMD_SO_SET_FRAME_LABEL (cmd);
 	
-	if (me->old_label) {
-		g_free (me->old_label);
-		me->old_label = NULL;
-	}
-	if (me->new_label) {
-		g_free (me->new_label);
-		me->new_label = NULL;
-	}
+	g_free (me->old_label);
+	me->old_label = NULL;
+
+	g_free (me->new_label);
+	me->new_label = NULL;
+
 	gnm_command_finalize (cmd);
 }
 
@@ -7175,10 +7173,8 @@ cmd_so_set_checkbox_finalize (GObject *cmd)
 		gnm_expr_top_unref (me->new_link);
 	if (me->old_link)
 		gnm_expr_top_unref (me->old_link);
-	if (me->old_label)
-		g_free (me->old_label);
-	if (me->new_label)
-		g_free (me->new_label);
+	g_free (me->old_label);
+	g_free (me->new_label);
 	gnm_command_finalize (cmd);
 }
 



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