Skip to content

Commit 74f1e4b

Browse files
committed
Fix crash when closing a repository while the commits are still being loaded
1 parent 1dfeab7 commit 74f1e4b

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

Classes/Controllers/PBViewController.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@
1313

1414
@interface PBViewController : NSViewController {
1515
// FIXME: these ivars must go, but most controller out there access it directly, so, not today
16-
PBGitRepository *repository;
16+
__weak PBGitRepository *repository;
1717
__weak PBGitWindowController *superController;
1818
}
1919

20-
@property (nonatomic, strong, readonly) PBGitRepository *repository;
20+
@property (nonatomic, weak, readonly) PBGitRepository *repository;
2121
@property (weak, readonly) PBGitWindowController *windowController;
2222
@property (copy) NSString *status;
2323
@property (assign) BOOL isBusy;

Classes/Controllers/PBViewController.m

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ - (void)closeView
3636
[self unbind:@"repository"];
3737
if (_hasViewLoaded)
3838
[[self view] removeFromSuperview]; // remove the current view
39-
repository = nil;
40-
superController = nil;
4139
}
4240

4341
- (void)awakeFromNib

0 commit comments

Comments
 (0)