From d8e2641775a0ceb4fa388c59968a75509250d923 Mon Sep 17 00:00:00 2001 From: jcorgan Date: Sat, 26 Apr 2008 03:26:58 +0000 Subject: [PATCH] Fix race on startup in fftsink2 (Josh Blum) git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@8279 221aa14e-8319-0410-a670-987f0aec2ac5 --- gr-wxgui/src/python/fftsink2.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gr-wxgui/src/python/fftsink2.py b/gr-wxgui/src/python/fftsink2.py index c3df18d2..61906bfa 100755 --- a/gr-wxgui/src/python/fftsink2.py +++ b/gr-wxgui/src/python/fftsink2.py @@ -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]: -- 2.47.2