From 93675de084c153a23a55761a575ccec37cddc71d Mon Sep 17 00:00:00 2001 From: Adam D Date: Fri, 13 Mar 2015 07:53:26 +1030 Subject: [PATCH] fix crashing when there is no superview (whoops) --- HBTSStatusBarView.mm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/HBTSStatusBarView.mm b/HBTSStatusBarView.mm index 3a5378a..51641f0 100644 --- a/HBTSStatusBarView.mm +++ b/HBTSStatusBarView.mm @@ -3,7 +3,6 @@ #import #import #import -#import #import #import #import @@ -219,7 +218,7 @@ - (void)receivedStatusNotification:(NSNotification *)notification { } - (void)showWithTimeout:(NSTimeInterval)timeout { - if ([UIApplication sharedApplication].statusBarHidden) { + if ([UIApplication sharedApplication].statusBarHidden || !self.superview || ![self.superview isKindOfClass:UIStatusBar.class]) { return; }