diff --git a/tools/rxtools/src/rxtools/rxplot.py b/tools/rxtools/src/rxtools/rxplot.py index 4c44ae35..55741e4a 100644 --- a/tools/rxtools/src/rxtools/rxplot.py +++ b/tools/rxtools/src/rxtools/rxplot.py @@ -332,7 +332,7 @@ class RxPlotFrame(wx.Frame): plot_datax.extend(datax) plot_datay.extend(datay) - if self.buffer_size > 0: + if len(plot_datax) > 0 and self.buffer_size > 0: xcutoff = plot_datax[-1] - self.buffer_size while len(plot_datax) > 0 and plot_datax[0] < xcutoff: plot_datax.popleft()