]> git.saurik.com Git - wxWidgets.git/blobdiff - contrib/src/animate/animate.cpp
wxFrameLayout contains wxPen by value, so the wxPen class declaration from wx/pen...
[wxWidgets.git] / contrib / src / animate / animate.cpp
index f033901e6279c2214392147fd71bd826cbb477db..64309fc8a6e6414d66180bf8435d0edc4d39f06a 100644 (file)
@@ -270,7 +270,11 @@ bool wxAnimationPlayer::PlayFrame()
     PlayFrame(GetCurrentFrame(), * GetWindow(), GetPosition());
 
     // Set the timer for the next frame
-    m_timer.Start(GetDelay(GetCurrentFrame()));
+    int delay = GetDelay(GetCurrentFrame());
+    if (delay == 0)
+        delay = 1;      // 0 is invalid timeout for wxTimer.
+    
+    m_timer.Start(delay);
 
     m_currentFrame ++;