[goffice] Fix a craher introduced with last commit.
- From: Jean Bréfort <jbrefort src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [goffice] Fix a craher introduced with last commit.
- Date: Thu, 8 Jan 2015 14:56:13 +0000 (UTC)
commit 016c35d53b03b231352272cec453ea2136e682a6
Author: Jean Brefort <jean brefort normalesup org>
Date: Thu Jan 8 15:55:47 2015 +0100
Fix a craher introduced with last commit.
ChangeLog | 5 +++++
NEWS | 1 +
goffice/graph/gog-axis-line.c | 7 +++++--
3 files changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 9ccab4c..416079d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2015-01-08 Jean Brefort <jean brefort normalesup org>
+ * goffice/graph/gog-axis-line.c (gog_axis_line_get_ticks): don't return
+ invalid ticks.
+
+2015-01-08 Jean Brefort <jean brefort normalesup org>
+
* goffice/graph/gog-axis-line.c: allow custom ticks and grid lines for axis
lines. [#600482]
* goffice/graph/gog-axis-line.h: ditto.
diff --git a/NEWS b/NEWS
index 012786c..ea9c4b5 100644
--- a/NEWS
+++ b/NEWS
@@ -6,6 +6,7 @@ Jean:
* Implement canvas native scrolling. [#741394]
* Don't use a data vector with no valid value. [#741910]
* Allow custom ticks and grid lines for axis lines. [#600482]
+
Morten:
* Dead kitten salvage.
* Fix canvas issues when removing items.
diff --git a/goffice/graph/gog-axis-line.c b/goffice/graph/gog-axis-line.c
index f7e3be5..d770dfa 100644
--- a/goffice/graph/gog-axis-line.c
+++ b/goffice/graph/gog-axis-line.c
@@ -2693,6 +2693,9 @@ GSF_CLASS_FULL (GogAxisLine, gog_axis_line,
unsigned
gog_axis_line_get_ticks (GogAxisLine *axis_line, GogAxisTick **ticks)
{
- *ticks = axis_line->ticks;
- return axis_line->tick_nbr;
+ if (axis_line->custom_ticks[0].data != NULL && go_data_has_value (axis_line->custom_ticks[0].data)) {
+ *ticks = axis_line->ticks;
+ return axis_line->tick_nbr;
+ }
+ return 0;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]