From cf07453fc87ac6ddd0b01086d9400a5dc620eb33 Mon Sep 17 00:00:00 2001 From: Gautier Pelloux-Prayer Date: Fri, 18 Dec 2015 11:26:14 +0100 Subject: [PATCH] UIBouncingView: fix crash when monkey typing between views --- Classes/LinphoneUI/UIBouncingView.m | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Classes/LinphoneUI/UIBouncingView.m b/Classes/LinphoneUI/UIBouncingView.m index b56157b69..a7f4b4d0c 100644 --- a/Classes/LinphoneUI/UIBouncingView.m +++ b/Classes/LinphoneUI/UIBouncingView.m @@ -99,6 +99,7 @@ INIT_WITH_COMMON { if (!self.hidden) { return; } + [self setHidden:FALSE]; if ([[LinphoneManager instance] lpConfigBoolForKey:@"animations_preference"] == true) { if (animated) { @@ -106,7 +107,9 @@ INIT_WITH_COMMON { target:self completion:^(BOOL finished) { [self startBounceAnimation:kBounceAnimation target:self]; - [self.layer removeAnimationForKey:kAppearAnimation]; + if (finished) { + [self.layer removeAnimationForKey:kAppearAnimation]; + } }]; } else { [self startBounceAnimation:kBounceAnimation target:self]; @@ -125,7 +128,9 @@ INIT_WITH_COMMON { target:self completion:^(BOOL finished) { [self setHidden:TRUE]; - [self.layer removeAnimationForKey:kDisappearAnimation]; + if (finished) { + [self.layer removeAnimationForKey:kDisappearAnimation]; + } }]; } else { [self setHidden:TRUE];