[gnumeric] Fix crash on unknown chart type. [#594041]
- From: Andreas J. Guelzow <guelzow src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnumeric] Fix crash on unknown chart type. [#594041]
- Date: Thu, 3 Sep 2009 18:50:41 +0000 (UTC)
commit e17cad79d8c46c46f327fcdecc17c4c0f243aca1
Author: Andreas J. Guelzow <aguelzow math concordia ab ca>
Date: Thu Sep 3 12:49:41 2009 -0600
Fix crash on unknown chart type. [#594041]
2009-09-03 Andreas J. Guelzow <aguelzow pyrshep ca>
* openoffice-write.c (odf_graph_get_series): make sure texpr is non-NULL
(odf_write_plot): check the correct end of array marker
NEWS | 1 +
plugins/openoffice/ChangeLog | 5 +++++
plugins/openoffice/openoffice-write.c | 4 ++--
3 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/NEWS b/NEWS
index 0b5e07a..61e07b4 100644
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,7 @@ Andreas:
* Add CHOLESKY.
* Fix ODF background colour export. [#593816]
* Handle super/subscript in html export. [#593851]
+ * Fix carsh on unknown chart type. [#594041]
Morten:
* Fix menu sensitivity problem. [#593624]
diff --git a/plugins/openoffice/ChangeLog b/plugins/openoffice/ChangeLog
index 0a17186..275c1aa 100644
--- a/plugins/openoffice/ChangeLog
+++ b/plugins/openoffice/ChangeLog
@@ -1,3 +1,8 @@
+2009-09-03 Andreas J. Guelzow <aguelzow pyrshep ca>
+
+ * openoffice-write.c (odf_graph_get_series): make sure texpr is non-NULL
+ (odf_write_plot): check the correct end of array marker
+
2009-09-01 Andreas J. Guelzow <aguelzow pyrshep ca>
* openoffice-write.c (gnm_xml_out_add_hex_color): simplify comparison
diff --git a/plugins/openoffice/openoffice-write.c b/plugins/openoffice/openoffice-write.c
index 4ef3e6c..5fc396b 100644
--- a/plugins/openoffice/openoffice-write.c
+++ b/plugins/openoffice/openoffice-write.c
@@ -2115,7 +2115,7 @@ odf_graph_get_series (GnmOOExport *state, GogGraph *sog, GnmParsePos *pp)
for (;list != NULL; list = list->next) {
GOData *dat = list->data;
GnmExprTop const *texpr = gnm_go_data_get_expr (dat);
- if (gnm_expr_top_is_rangeref (texpr)) {
+ if (texpr != NULL && gnm_expr_top_is_rangeref (texpr)) {
char *formula = gnm_expr_top_as_string (texpr, pp, state->conv);
g_string_append (str, odf_strip_brackets (formula));
g_string_append_c (str, ' ');
@@ -3573,7 +3573,7 @@ odf_write_plot (GnmOOExport *state, SheetObject *so, GogObject const *chart, Gog
NULL, NULL, odf_write_standard_series, NULL}
};
- for (this_plot = &plots[0]; this_plot != NULL; this_plot++)
+ for (this_plot = &plots[0]; this_plot->type != NULL; this_plot++)
if (0 == strcmp (plot_type, this_plot->type))
break;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]