[gnumeric] value_get_as_gstring: handle partial arrays for debugging.



commit 47a4516d3f0109caf856e4060df23924fe684494
Author: Morten Welinder <terra gnome org>
Date:   Fri Nov 6 22:15:38 2009 -0500

    value_get_as_gstring: handle partial arrays for debugging.

 ChangeLog   |    8 ++++++--
 src/value.c |    6 +++++-
 2 files changed, 11 insertions(+), 3 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index d7174c0..de4ff31 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,11 @@
+2009-11-06  Morten Welinder  <terra gnome org>
+
+	* src/value.c (value_get_as_gstring): Handle partial arrays.
+
 2009-11-04  Jean Brefort  <jean brefort normalesup org>
 
-	* src/item-cursor.c (item_cursor_realize), (item_cursor_unrealize),
-	(item_cursor_draw), (item_cursor_set_property), (item_cursor_init): back
+	* src/item-cursor.c (item_cursor_realize, item_cursor_unrealize,
+	(item_cursor_draw,  item_cursor_set_property, item_cursor_init): back
 	to rendering using gdk. [#600656]
 	* src/item-edit.c (item_edit_draw): do not change the background when
 	editing and make the cursor visible on dark backgrounds.
diff --git a/src/value.c b/src/value.c
index 5be8d94..53cf7dd 100644
--- a/src/value.c
+++ b/src/value.c
@@ -918,7 +918,11 @@ value_get_as_gstring (GnmValue const *v, GString *target,
 					g_string_append_unichar (target, col_sep);
 
 				/* quote strings */
-				if (VALUE_IS_STRING (val))
+				if (!val) {
+					/* This is not supposed to happen, but
+					   let's not crash anyway.  */
+					g_string_append (target, "?");
+				} else if (VALUE_IS_STRING (val))
 					go_strescape (target, val->v_str.val->str);
 				else
 					value_get_as_gstring (val, target, conv);



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