changeset 969:d4b934d97a62

check range of pointer
author Thinker K.F. Li <thinker@codemud.net>
date Thu, 18 Nov 2010 12:02:21 +0800
parents a715301b5879
children a1ebbe11354d
files pyink/frameline.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/pyink/frameline.py	Thu Nov 18 11:54:37 2010 +0800
+++ b/pyink/frameline.py	Thu Nov 18 12:02:21 2010 +0800
@@ -157,7 +157,8 @@
     
     def _motion_hdl(self, widget, event):
         frame = int(event.x / self._frame_width)
-        self._draw_hover(frame)
+        if frame < self._num_frames and frame >= 0:
+            self._draw_hover(frame)
         pass
 
     def _fl_expose(self, widget, event):