[goffice] Fix crash in 3D plots when X or Y values are missing. [#788437]
- From: Jean Bréfort <jbrefort src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [goffice] Fix crash in 3D plots when X or Y values are missing. [#788437]
- Date: Mon, 2 Oct 2017 17:05:01 +0000 (UTC)
commit 63aff6ab8e6d335d8879731adf372cac5e03c911
Author: Jean Brefort <jean brefort normalesup org>
Date: Mon Oct 2 19:04:42 2017 +0200
Fix crash in 3D plots when X or Y values are missing. [#788437]
ChangeLog | 6 ++++++
NEWS | 1 +
plugins/plot_surface/gog-xyz-surface.c | 2 ++
3 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index dff7c42..deffcf4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2017-10-02 Jean Brefort <jean brefort normalesup org>
+
+ * plugins/plot_surface/gog-xyz-surface.c
+ (gog_xyz_surface_plot_build_matrix): don't crash if X or Y values are
+ missing. [#788437]
+
2017-08-03 Jean Brefort <jean brefort normalesup org>
* goffice/utils/go-format.c (printf_engineering): fix engineering format.
diff --git a/NEWS b/NEWS
index 4d0caaf..f332655 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,7 @@ goffice 0.10.36:
Jean:
* Fix engineering format. [#785669]
+ * Fix crash in 3D plots when X or Y values are missing. [#788437]
--------------------------------------------------------------------------
goffice 0.10.35:
diff --git a/plugins/plot_surface/gog-xyz-surface.c b/plugins/plot_surface/gog-xyz-surface.c
index 53d373a..b1a1750 100644
--- a/plugins/plot_surface/gog-xyz-surface.c
+++ b/plugins/plot_surface/gog-xyz-surface.c
@@ -325,6 +325,8 @@ gog_xyz_surface_plot_build_matrix (GogXYZPlot *plot, gboolean *cardinality_chang
&x_vals, &y_vals, &z_vals);
else
kmax = gog_series_get_xy_data (GOG_SERIES (series), &x_vals, &y_vals);
+ if (x_vals == NULL || y_vals == NULL)
+ return NULL;
/* sort the data by column and row */
raw_data.values[0] = x_vals;
raw_data.values[1] = y_vals;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]