[goffice] AxisColorMap: add precondition.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [goffice] AxisColorMap: add precondition.
- Date: Tue, 24 May 2016 21:50:41 +0000 (UTC)
commit 40e5905a62d98285d85cc8343e2e240cecd2e603
Author: Morten Welinder <terra gnome org>
Date: Tue May 24 17:50:13 2016 -0400
AxisColorMap: add precondition.
goffice/graph/gog-axis-color-map.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/goffice/graph/gog-axis-color-map.c b/goffice/graph/gog-axis-color-map.c
index 3003b44..1f93f66 100644
--- a/goffice/graph/gog-axis-color-map.c
+++ b/goffice/graph/gog-axis-color-map.c
@@ -559,7 +559,10 @@ gog_axis_color_map_to_cairo (GogAxisColorMap const *map, cairo_t *cr,
unsigned discrete, gboolean horizontal,
double width, double height)
{
- unsigned i, max = gog_axis_color_map_get_max (map);
+ unsigned i, max;
+
+ g_return_if_fail (GOG_IS_AXIS_COLOR_MAP (map));
+ max = gog_axis_color_map_get_max (map);
if (discrete) {
GOColor color;
double t0, maxt, step, start, scale = 1;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]