Fix race on startup in fftsink2 (Josh Blum)
authorjcorgan <jcorgan@221aa14e-8319-0410-a670-987f0aec2ac5>
Sat, 26 Apr 2008 03:26:58 +0000 (03:26 +0000)
committerjcorgan <jcorgan@221aa14e-8319-0410-a670-987f0aec2ac5>
Sat, 26 Apr 2008 03:26:58 +0000 (03:26 +0000)
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@8279 221aa14e-8319-0410-a670-987f0aec2ac5

gr-wxgui/src/python/fftsink2.py

index c3df18d25f13f6d26034e1874063f29dedc77932..61906bfa1084936498b90e2f148fb9666c357e16 100755 (executable)
@@ -374,7 +374,10 @@ class fft_window (plot.PlotCanvas):
         self.PopupMenu(menu, event.GetPosition())
 
     def evt_motion(self, event):
-        # Clip to plotted values
+        if not hasattr(self, "_points"):
+           return # Got here before first window data update
+           
+       # Clip to plotted values
         (ux, uy) = self.GetXY(event)      # Scaled position
         x_vals = numpy.array(self._points[:,0])
         if ux < x_vals[0] or ux > x_vals[-1]: