Skip to content

Commit

Permalink
Fix crash
Browse files Browse the repository at this point in the history
  • Loading branch information
Zepo committed May 12, 2016
1 parent 3456267 commit e346665
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions MLeaksFinder/UINavigationController+MemoryLeak.m
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,10 @@ - (UIViewController *)swizzled_popViewControllerAnimated:(BOOL)animated {
}

// VC is not dealloced until disappear when popped using a left-edge swipe gesture
extern const void *const kHasBeenPoppedKey;
objc_setAssociatedObject(poppedViewController, kHasBeenPoppedKey, @(YES), OBJC_ASSOCIATION_RETAIN);
if (poppedViewController) {
extern const void *const kHasBeenPoppedKey;
objc_setAssociatedObject(poppedViewController, kHasBeenPoppedKey, @(YES), OBJC_ASSOCIATION_RETAIN);
}

return poppedViewController;
}
Expand Down

0 comments on commit e346665

Please sign in to comment.