From: Robin Dunn Date: Mon, 23 May 2005 23:51:06 +0000 (+0000) Subject: Avoid an assert on wxMSW and ensure we don't use a zero delay for the X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/1c5f3f511df4221851e4f145ce8e3985c7ab1fe3?ds=inline 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 --- diff --git a/contrib/src/animate/animate.cpp b/contrib/src/animate/animate.cpp index f033901e62..64309fc8a6 100644 --- a/contrib/src/animate/animate.cpp +++ b/contrib/src/animate/animate.cpp @@ -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 ++;