[gnumeric] Fix test suite failures.



commit 2fb503a3f9ee28105ca5c9e3abc0f62f784e7cd3
Author: Morten Welinder <terra gnome org>
Date:   Wed Apr 22 20:08:06 2009 -0400

    Fix test suite failures.
---
 src/commands.c            |    5 ++---
 src/sheet-object-widget.c |    3 +--
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/src/commands.c b/src/commands.c
index f504d58..2c90c67 100644
--- a/src/commands.c
+++ b/src/commands.c
@@ -4678,8 +4678,7 @@ cmd_object_format_finalize (GObject *cmd)
 	CmdObjectFormat *me = CMD_OBJECT_FORMAT (cmd);
 	g_object_unref (me->style);
 	g_object_unref (me->so);
-	if (me->text)
-		g_free (me->text);
+	g_free (me->text);
 	if (me->attr)
 		pango_attr_list_unref (me->attr);
 	gnm_command_finalize (cmd);
@@ -4701,7 +4700,7 @@ cmd_object_format (WorkbookControl *wbc, SheetObject *so,
 
 	me->so    = g_object_ref (G_OBJECT (so));
 	me->style = g_object_ref (G_OBJECT (orig_style));
-	me->text = orig_text ? g_strdup (orig_text) : NULL;
+	me->text  = g_strdup (orig_text);
 	if (orig_attr != NULL) {
 		me->attr = orig_attr;
 		pango_attr_list_ref (me->attr);
diff --git a/src/sheet-object-widget.c b/src/sheet-object-widget.c
index 9755275..8917ecc 100644
--- a/src/sheet-object-widget.c
+++ b/src/sheet-object-widget.c
@@ -972,8 +972,7 @@ cb_adjustment_config_destroy (AdjustmentConfigState *state)
 		g_object_unref (G_OBJECT (state->gui));
 		state->gui = NULL;
 	}
-	if (state->undo_label)
-		g_free (state->undo_label);
+	g_free (state->undo_label);
 
 	state->dialog = NULL;
 	g_free (state);



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