[goffice] Fix crash in countour plots when no color is used. [#705913]
- From: Jean Bréfort <jbrefort src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [goffice] Fix crash in countour plots when no color is used. [#705913]
- Date: Wed, 14 Aug 2013 13:59:33 +0000 (UTC)
commit 4f7db3d44d75158a8f711745b76be706a4790a92
Author: Jean Brefort <jean brefort normalesup org>
Date: Wed Aug 14 15:57:51 2013 +0200
Fix crash in countour plots when no color is used. [#705913]
ChangeLog | 8 +++++++-
NEWS | 1 +
plugins/plot_surface/gog-contour.c | 2 ++
3 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 2c706c3..f3490ed 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-08-14 Jean Brefort <jean brefort normalesup org>
+
+ * plugins/plot_surface/gog-contour.c (gog_contour_view_render): don't crash
+ if there is no color is used. [#705913]
+
2013-08-11 Morten Welinder <terra gnome org>
* goffice/utils/formats.c (_go_format_builtins)
@@ -10,7 +15,8 @@
* goffice/graph/gog-renderer.h: ditto.
* goffice/utils/go-editor.c (go_editor_add_page): ditto.
* goffice/utils/go-image.c (go_image_draw_fb),
- (go_image_get_pixbuf_fb), (go_image_new_from_data): ditto and .
+ (go_image_get_pixbuf_fb), (go_image_new_from_data): ditto and fix crash
++ when drawing a fallback image without gtk (from ssconvert). [#705677]
2013-08-05 Jean Brefort <jean brefort normalesup org>
diff --git a/NEWS b/NEWS
index 80a388b..4c9683e 100644
--- a/NEWS
+++ b/NEWS
@@ -11,6 +11,7 @@ Jean:
* Implement get_data_at_point for area and line plots. [#627277][#689661]
* Fix rendring of stacked area plots. [#705034]
* Fix crash when drawing a fallback image without gtk. [#705677]
+ * Fix crash in countour plots when no color is used. [#705913]
Morten:
* Add prescaling to go_linear_regression_leverage. [#703381]
diff --git a/plugins/plot_surface/gog-contour.c b/plugins/plot_surface/gog-contour.c
index 3566eb9..e5fa7b9 100644
--- a/plugins/plot_surface/gog-contour.c
+++ b/plugins/plot_surface/gog-contour.c
@@ -285,6 +285,8 @@ gog_contour_view_render (GogView *view, GogViewAllocation const *bbox)
return;
series = GOG_SERIES (plot->base.series->data);
max = GOG_CONTOUR_PLOT (plot)->max_colors;
+ if (max < 1)
+ return;
if (plot->transposed) {
imax = plot->columns;
jmax = plot->rows;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]