From 481ff983e45eb64019d0e506b6cdbd453803676d Mon Sep 17 00:00:00 2001 From: Mandea Daniel Date: Fri, 27 Nov 2015 13:46:47 +0200 Subject: [PATCH] Fixed KVC remove observer crash for XLTwitterPagerTabStripViewController --- .../XL/Controllers/XLTwitterPagerTabStripViewController.m | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/XLPagerTabStrip/XL/Controllers/XLTwitterPagerTabStripViewController.m b/XLPagerTabStrip/XL/Controllers/XLTwitterPagerTabStripViewController.m index aab8ed1..3f9694a 100644 --- a/XLPagerTabStrip/XL/Controllers/XLTwitterPagerTabStripViewController.m +++ b/XLPagerTabStrip/XL/Controllers/XLTwitterPagerTabStripViewController.m @@ -174,7 +174,11 @@ -(void)dealloc { - [self.navigationView removeObserver:self forKeyPath:@"frame"]; + // Perform a try catch when removing a observer in case it was never registered + @try { + [self.navigationView removeObserver:self forKeyPath:@"frame"]; + } + @catch (NSException * __unused exception) {} }