Commit 4a39c1e3 authored by Luke Campagnola's avatar Luke Campagnola
Browse files

Fixed bug 1089042 (AttributeError in PlotItem)

parent 45048467
......@@ -158,6 +158,8 @@ class PlotItem(GraphicsWidget):
self.autoAlpha = True
self.spectrumMode = False
self.legend = None
## Create and place axis items
if axisItems is None:
axisItems = {}
......@@ -538,7 +540,7 @@ class PlotItem(GraphicsWidget):
name = kargs.get('name', getattr(item, 'opts', {}).get('name', None))
if name is not None and self.legend is not None:
if name is not None and hasattr(self, 'legend') and self.legend is not None:
self.legend.addItem(item, name=name)
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