diff --git a/piker/ui/_ohlc.py b/piker/ui/_ohlc.py index fb57d6ff..f10a4998 100644 --- a/piker/ui/_ohlc.py +++ b/piker/ui/_ohlc.py @@ -274,8 +274,9 @@ class BarItems(pg.GraphicsObject): # lead to any perf gains other then when zoomed in to less bars # in view. p.setPen(self.last_bar_pen) - p.drawLines(*tuple(filter(bool, self._last_bar_lines))) - profiler('draw last bar') + if self._last_bar_lines: + p.drawLines(*tuple(filter(bool, self._last_bar_lines))) + profiler('draw last bar') p.setPen(self.bars_pen) p.drawPath(self.path)