From 8434297daf039293ef98ddc03c01a232e1a813d5 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Tue, 7 Nov 2006 05:12:52 +0000 Subject: [PATCH] The "small optimization" causes asserts if Play is called before the first EVT_SIZE event (because the m_backingStore bitmap won't have been created yet) so take it out. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43140 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/generic/animateg.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/generic/animateg.cpp b/src/generic/animateg.cpp index 8daee51ebf..4f793eac48 100644 --- a/src/generic/animateg.cpp +++ b/src/generic/animateg.cpp @@ -373,15 +373,11 @@ bool wxAnimationCtrl::Play(bool looped) if (!m_animation.IsOk()) return false; - int oldframe = m_currentFrame; m_looped = looped; m_currentFrame = 0; - // small optimization: if the back store was already updated to the - // first frame, don't rebuild it - if (oldframe != 0) - if (!RebuildBackingStoreUpToFrame(0)) - return false; + if (!RebuildBackingStoreUpToFrame(0)) + return false; m_isPlaying = true; -- 2.45.2