Skip to content

Commit c31a24c

Browse files
committed
Try over-retaining some void* casts to keep the objects around 'till they are handled
Note that these currently aren't balanced.
1 parent ae1fd3d commit c31a24c

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

PBGitIndexController.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ - (void) discardChangesForFiles:(NSArray *)files force:(BOOL)force
216216
[alert beginSheetModalForWindow:[[commitController view] window]
217217
modalDelegate:self
218218
didEndSelector:@selector(discardChangesForFilesAlertDidEnd:returnCode:contextInfo:)
219-
contextInfo:(__bridge void*)files];
219+
contextInfo:(__bridge_retained void*)files];
220220
} else {
221221
[commitController.index discardChangesForFiles:files];
222222
}

PBRefController.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ - (void)showConfirmPushRefSheet:(PBGitRef *)ref remote:(PBGitRef *)remoteRef
8989
[alert beginSheetModalForWindow:[historyController.repository.windowController window]
9090
modalDelegate:self
9191
didEndSelector:@selector(confirmPushRefSheetDidEnd:returnCode:contextInfo:)
92-
contextInfo:(__bridge void*)info];
92+
contextInfo:(__bridge_retained void*)info];
9393
}
9494

9595
- (void)confirmPushRefSheetDidEnd:(NSAlert *)sheet returnCode:(int)returnCode contextInfo:(void *)contextInfo
@@ -270,7 +270,7 @@ - (void)showDeleteRefSheet:(PBRefMenuItem *)sender
270270
[alert beginSheetModalForWindow:[historyController.repository.windowController window]
271271
modalDelegate:self
272272
didEndSelector:@selector(deleteRefSheetDidEnd:returnCode:contextInfo:)
273-
contextInfo:(__bridge void*)ref];
273+
contextInfo:(__bridge_retained void*)ref];
274274
}
275275

276276
- (void)deleteRefSheetDidEnd:(NSAlert *)sheet returnCode:(int)returnCode contextInfo:(void *)contextInfo
@@ -426,7 +426,7 @@ - (BOOL)tableView:(NSTableView *)aTableView
426426
[alert beginSheetModalForWindow:[historyController.repository.windowController window]
427427
modalDelegate:self
428428
didEndSelector:@selector(acceptDropInfoAlertDidEnd:returnCode:contextInfo:)
429-
contextInfo:(__bridge void*)dropInfo];
429+
contextInfo:(__bridge_retained void*)dropInfo];
430430

431431
return YES;
432432
}

PBWebChangesController.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ - (void)discardHunk:(NSString *)hunk altKey:(BOOL)altKey
119119
[alert beginSheetModalForWindow:[[controller view] window]
120120
modalDelegate:self
121121
didEndSelector:@selector(discardHunkAlertDidEnd:returnCode:contextInfo:)
122-
contextInfo:(__bridge void*)hunk];
122+
contextInfo:(__bridge_retained void*)hunk];
123123
} else {
124124
[self discardHunk:hunk];
125125
}

0 commit comments

Comments
 (0)