[goffice] Do not crash when displaying cubic spline with no abscissa. [#627507]



commit 8a5bbf1eaaffda347e6f256606c11cf4988c1133
Author: Jean Brefort <jean brefort normalesup org>
Date:   Fri Aug 20 17:47:25 2010 +0200

    Do not crash when displaying cubic spline with no abscissa. [#627507]

 ChangeLog                     |    5 +++++
 NEWS                          |    1 +
 goffice/graph/gog-chart-map.c |    2 +-
 3 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 931d29b..4e505d8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-08-20  Jean Brefort  <jean brefort normalesup org>
+
+	* goffice/graph/gog-chart-map.c (make_path_cspline): do not check order
+	for NULL abscissa. [#627507]
+
 2010-08-20  Morten Welinder  <terra gnome org>
 
 	* goffice/math/go-rangefunc.c (go_range_increasing)
diff --git a/NEWS b/NEWS
index 2a3ac65..7c53ce2 100644
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,7 @@ goffice 0.8.10:
 Jean:
 	* Always use real line width when evaluating dashes. [#442546]
 	* Update x and y limits when data change for xyz plots. [#627288]
+	* Do not crash when displaying cubic spline with no abscissa. [#627507]
 
 Morten:
 	* Limit formats to sane number of decimals.  [#627066]
diff --git a/goffice/graph/gog-chart-map.c b/goffice/graph/gog-chart-map.c
index 4fc0b5a..4af73c5 100644
--- a/goffice/graph/gog-chart-map.c
+++ b/goffice/graph/gog-chart-map.c
@@ -342,7 +342,7 @@ make_path_cspline (GogChartMap *map,
 	GOCSpline *spline;
 
 	path = go_path_new ();
-	if (n_points < 1 || !go_range_vary_uniformly (x, n_points))
+	if (n_points < 1 || (x && !go_range_vary_uniformly (x, n_points)))
 		return path;
 
 	uu = g_new (double, n_points);



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