[goffice] protect against missing data



commit f5a3f39f7bcc04393d34d78f34cb25ece7a259d5
Author: Andreas J. Guelzow <aguelzow pyrshep ca>
Date:   Sat Feb 7 12:05:13 2015 -0700

    protect against missing data
    
    2015-02-07 Andreas J. Guelzow <aguelzow pyrshep ca>
    
        * graph/gog-chart-map.c: protect against missing data

 ChangeLog                     |    4 ++++
 goffice/graph/gog-chart-map.c |    2 +-
 2 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 05f3078..76bae68 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2015-02-07 Andreas J. Guelzow <aguelzow pyrshep ca>
+
+       * graph/gog-chart-map.c: protect against missing data
+
 2015-02-04  Morten Welinder <terra gnome org>
 
        * configure.ac: Post-release bump.
diff --git a/goffice/graph/gog-chart-map.c b/goffice/graph/gog-chart-map.c
index a006b23..cd205a6 100644
--- a/goffice/graph/gog-chart-map.c
+++ b/goffice/graph/gog-chart-map.c
@@ -534,7 +534,7 @@ xy_make_path (GogChartMap *map, double const *x, double const *y,
                        path = xy_make_path_step (map, x, y, n_points, interpolation, skip_invalid);
                        break;
                case GO_LINE_INTERPOLATION_ODF_SPLINE:
-                       if (x[0] == x[n_points - 1] && y[0] == y[n_points - 1])
+                       if (x != NULL && y != NULL && x[0] == x[n_points - 1] && y[0] == y[n_points - 1])
                                path = make_path_spline (map, x, y, n_points - 1, TRUE, TRUE, skip_invalid);
                        else
                                path = make_path_spline (map, x, y, n_points, FALSE, FALSE, skip_invalid);


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