diff --git a/apps/shared/curve_view.cpp b/apps/shared/curve_view.cpp index 1f1b38356..9428d4e98 100644 --- a/apps/shared/curve_view.cpp +++ b/apps/shared/curve_view.cpp @@ -187,6 +187,9 @@ float CurveView::gridUnit(Axis axis) const { int CurveView::numberOfLabels(Axis axis) const { float labelStep = 2.0f * gridUnit(axis); + if (labelStep <= 0.0f) { + return 0; + } float minLabel = std::ceil(min(axis)/labelStep); float maxLabel = std::floor(max(axis)/labelStep); int numberOfLabels = maxLabel - minLabel + 1;