Avoid an assert on wxMSW and ensure we don't use a zero delay for the

timer.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34307 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn 2005-05-23 23:51:06 +00:00
parent 3f302e7533
commit 1c5f3f511d

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