Skip to content

Commit 4ce6f02

Browse files
committed
#311: convert a __weak pointer to __unsafe_unretained because Lion can’t handle it
1 parent b5487f9 commit 4ce6f02

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

Classes/Controllers/PBGitHistoryController.m

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -104,16 +104,12 @@ - (void)awakeFromNib
104104
bottomColor:[NSColor colorWithCalibratedHue:0.579 saturation:0.119 brightness:0.765 alpha:1.000]];
105105
[self updateBranchFilterMatrix];
106106

107-
// listen for updates
108-
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_repositoryUpdatedNotification:) name:PBGitRepositoryEventNotification object:repository];
109-
110-
__weak PBGitHistoryController *weakSelf = self;
111-
commitList.findPanelActionBlock = ^(id sender){
112-
PBGitHistoryController *controller = weakSelf;
113-
if (!controller) {
114-
return;
115-
}
116-
[controller.view.window makeFirstResponder:controller->searchField];
107+
// listen for updates
108+
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_repositoryUpdatedNotification:) name:PBGitRepositoryEventNotification object:repository];
109+
110+
__unsafe_unretained PBGitHistoryController *weakSelf = self;
111+
commitList.findPanelActionBlock = ^(id sender) {
112+
[weakSelf.view.window makeFirstResponder:weakSelf->searchField];
117113
};
118114

119115
[super awakeFromNib];

0 commit comments

Comments
 (0)