Permalink
Browse files

Merge pull request #51 from fousa/master

Always perform completion, even if there is nog left or right view controller
  • Loading branch information...
2 parents ae636bf + b778d2a commit dffb7702cbc15d1c31eb9e87c99410a9c1c311d4 @Inferis Inferis committed Mar 11, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 ViewDeck/IIViewDeckController.m
View
6 ViewDeck/IIViewDeckController.m
@@ -554,12 +554,12 @@ - (void)showCenterView:(BOOL)animated {
- (void)showCenterView:(BOOL)animated completion:(void(^)(IIViewDeckController* controller))completed {
BOOL mustRunCompletion = completed != nil;
- if (!self.leftController.view.hidden) {
+ if (self.leftController && !self.leftController.view.hidden) {
[self closeLeftViewAnimated:animated completion:completed];
mustRunCompletion = NO;
}
-
- if (!self.rightController.view.hidden) {
+
+ if (self.rightController && !self.rightController.view.hidden) {
[self closeRightViewAnimated:animated completion:completed];
mustRunCompletion = NO;
}

0 comments on commit dffb770

Please sign in to comment.