From 614b3d6f3deafd8f7f6bdb306ca28a8dad37d48d Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Tue, 20 Jan 2004 06:01:50 +0000 Subject: [PATCH] fix BGAnimation crash --- stepmania/src/BGAnimationLayer.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/stepmania/src/BGAnimationLayer.cpp b/stepmania/src/BGAnimationLayer.cpp index 15c12de668..b9a42aa2ed 100644 --- a/stepmania/src/BGAnimationLayer.cpp +++ b/stepmania/src/BGAnimationLayer.cpp @@ -1038,7 +1038,8 @@ void BGAnimationLayer::GainingFocus( float fRate, bool bRewindMovie, bool bLoop { m_fUpdateRate = fRate; - ASSERT( m_pActors.size() ); + if( !m_pActors.size() ) + return; // // The order of these actions is important. @@ -1058,6 +1059,9 @@ void BGAnimationLayer::GainingFocus( float fRate, bool bRewindMovie, bool bLoop void BGAnimationLayer::LosingFocus() { + if( !m_pActors.size() ) + return; + m_pActors[0]->Command( "pause" ); }