Skip to content

Commit

Permalink
NPE fix
Browse files Browse the repository at this point in the history
  • Loading branch information
farfromrefug committed Aug 12, 2014
1 parent 6d242b9 commit 15da09a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CoconutKit/Sources/Animation/HLSAnimation.m
Original file line number Diff line number Diff line change
Expand Up @@ -606,10 +606,14 @@ - (void)applicationDidEnterBackground:(NSNotification *)notification
- (void)applicationWillEnterForeground:(NSNotification *)notification
{
if (m_runningBeforeEnteringBackground) {
//we need to retain here because playWithStartTime might stop the animation
// and thus release us. THen we want to call [self pause]...
[self retain];
[self playWithStartTime:m_elapsedTime repeatCount:m_repeatCount];
if (m_pausedBeforeEnteringBackground) {
[self pause];
}
[self release];

m_runningBeforeEnteringBackground = NO;
m_pausedBeforeEnteringBackground = NO;
Expand Down

0 comments on commit 15da09a

Please sign in to comment.