diff --git a/traceplot.cpp b/traceplot.cpp index 66abb03..3704d24 100644 --- a/traceplot.cpp +++ b/traceplot.cpp @@ -29,6 +29,8 @@ TracePlot::TracePlot(std::shared_ptr source) : Plot(source void TracePlot::paintMid(QPainter &painter, QRect &rect, range_t sampleRange) { + if (sampleRange.length() == 0) return; + int samplesPerColumn = sampleRange.length() / rect.width(); int samplesPerTile = tileWidth * samplesPerColumn; size_t tileID = sampleRange.minimum / samplesPerTile;