[goffice] GogAxisLine: fix problem with tick count leading to crash.



commit cd78de3ad723eb06695122cec57b6f116f9a3e8d
Author: Morten Welinder <terra gnome org>
Date:   Sat Sep 26 13:29:50 2020 -0400

    GogAxisLine: fix problem with tick count leading to crash.
    
    See Gnumeric #524.

 ChangeLog                     | 5 +++++
 NEWS                          | 1 +
 goffice/graph/gog-axis-line.c | 1 +
 3 files changed, 7 insertions(+)
---
diff --git a/ChangeLog b/ChangeLog
index 66d3e41e..8b279587 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2020-09-26  Morten Welinder  <terra gnome org>
+
+       * goffice/graph/gog-axis-line.c (gog_axis_line_update_ticks): Zero
+       tick count when we dispose of ticks.  Fixes Gnumeric #524.
+
 2020-08-29  Morten Welinder  <terra gnome org>
 
        * goffice/utils/go-format.c (go_format_output_simple_to_odf):
diff --git a/NEWS b/NEWS
index 7cbc96bc..932a4710 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,7 @@ goffice 0.10.49:
 
 Morten:
        * Fix ods format problem.  [Gnumeric #518]
+       * Fix axis line crash.  [Gnumeric #524]
 
 --------------------------------------------------------------------------
 goffice 0.10.48:
diff --git a/goffice/graph/gog-axis-line.c b/goffice/graph/gog-axis-line.c
index 57465e88..d97a2680 100644
--- a/goffice/graph/gog-axis-line.c
+++ b/goffice/graph/gog-axis-line.c
@@ -2525,6 +2525,7 @@ gog_axis_line_update_ticks (GogAxisLine *line)
                g_free (line->ticks);
        }
        line->ticks = NULL;
+       line->tick_nbr = 0;
        pos = GO_DATA_VECTOR (line->custom_ticks[0].data);
        labels = GO_DATA_VECTOR (line->custom_ticks[1].data);
        if (pos != NULL && go_data_has_value (GO_DATA (pos)) && go_data_is_varying_uniformly (GO_DATA (pos))) 
{


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