]> git.saurik.com Git - wxWidgets.git/commitdiff
Avoid an assert on wxMSW and ensure we don't use a zero delay for the
authorRobin Dunn <robin@alldunn.com>
Mon, 23 May 2005 23:51:06 +0000 (23:51 +0000)
committerRobin Dunn <robin@alldunn.com>
Mon, 23 May 2005 23:51:06 +0000 (23:51 +0000)
timer.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34307 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

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 ++;