Skip to content

Commit

Permalink
Moved [self release] to end of _soundCompleted to prevent instance be…
Browse files Browse the repository at this point in the history
…ing prematurely released.
  • Loading branch information
Anton Kiland committed Sep 7, 2011
1 parent d85b92a commit cb40fce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions AKSystemSound.m
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@ - (void)_soundCompleted
{
@synchronized(self)
{
[[self class] _soundDidPlay:self];

_playing--;
if (_playing == 0)
{
Expand All @@ -146,8 +148,6 @@ - (void)_soundCompleted
AudioServicesRemoveSystemSoundCompletion(_soundID);
[self release];
}

[[self class] _soundDidPlay:self];
}
}

Expand Down

0 comments on commit cb40fce

Please sign in to comment.