Commit c9eecc04 authored by twanvl's avatar twanvl

fixed crash with empty numeric axes

parent df6558fc
...@@ -619,6 +619,7 @@ void GraphStats::setData(const GraphDataP& d) { ...@@ -619,6 +619,7 @@ void GraphStats::setData(const GraphDataP& d) {
GraphAxis& axis = axis_data(); GraphAxis& axis = axis_data();
values.clear(); values.clear();
if (!axis.numeric) return; if (!axis.numeric) return;
if (axis.groups.empty()) return;
values.push_back(make_pair(_("max"), axis.groups.back().name)); values.push_back(make_pair(_("max"), axis.groups.back().name));
values.push_back(make_pair(_("mean"), String::Format(_("%.2f"), axis.mean))); values.push_back(make_pair(_("mean"), String::Format(_("%.2f"), axis.mean)));
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment