[gnumeric] xlsx: fix crash.



commit 6de7d53c21d2afe25ebb6bdc78d4f755f04ae093
Author: Morten Welinder <terra gnome org>
Date:   Thu Mar 3 15:19:29 2011 -0500

    xlsx: fix crash.

 NEWS                      |    1 +
 plugins/excel/ChangeLog   |    9 +++++++--
 plugins/excel/xlsx-read.c |    2 +-
 3 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/NEWS b/NEWS
index bd76383..11d187e 100644
--- a/NEWS
+++ b/NEWS
@@ -25,6 +25,7 @@ Morten:
 	* Fix solver crash.  [Redhat #680572]
 	* Fix xml reading of constraints.  [Redhat #680572]
 	* Fix lpsolve/glpk writing of affine part.
+	* Fix xlsx import crash.  [#643808]
 
 Stanley Pinchak:
 	* Improve "dif" output.
diff --git a/plugins/excel/ChangeLog b/plugins/excel/ChangeLog
index edda322..c1ec2ee 100644
--- a/plugins/excel/ChangeLog
+++ b/plugins/excel/ChangeLog
@@ -1,3 +1,8 @@
+2011-03-03  Morten Welinder  <terra gnome org>
+
+	* xlsx-read.c (xlsx_chart_text): Avoid criticals in the absense of
+	chart text.
+
 2011-02-22  Andreas J. Guelzow <aguelzow pyrshep ca>
 
 	* xlsx-write.c (xlsx_axis_crosses_at): new
@@ -5,13 +10,13 @@
 
 2011-02-21  Andreas J. Guelzow <aguelzow pyrshep ca>
 
-	* xlsx-write.c (xlsx_write_comments): skip NULL author 
+	* xlsx-write.c (xlsx_write_comments): skip NULL author
 	(see glib bug #642944)
 
 2011-02-21  Andreas J. Guelzow <aguelzow pyrshep ca>
 
 	* xlsx-read.c (xlsx_chart_dtd): add c:crossesAt
-	(xlsx_cell_expr_begin): don't ignore shared expressions with 
+	(xlsx_cell_expr_begin): don't ignore shared expressions with
 	duplicate id
 
 2011-02-02  Morten Welinder <terra gnome org>
diff --git a/plugins/excel/xlsx-read.c b/plugins/excel/xlsx-read.c
index 46747b8..e766556 100644
--- a/plugins/excel/xlsx-read.c
+++ b/plugins/excel/xlsx-read.c
@@ -1667,7 +1667,7 @@ xlsx_chart_text (GsfXMLIn *xin, G_GNUC_UNUSED GsfXMLBlob *blob)
 	if (NULL == state->series) {
 		GogObject *label = gog_object_add_by_name (state->cur_obj,
 			(state->cur_obj == (GogObject *)state->chart) ? "Title" : "Label", NULL);
-		if (NULL != label) {
+		if (NULL != label && state->chart_tx) {
 			GnmValue *value = value_new_string_nocopy (state->chart_tx);
 			GnmExprTop const *texpr = gnm_expr_top_new_constant (value);
 			gog_dataset_set_dim (GOG_DATASET (label), 0,



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