Skip to content

Commit 1db49ab

Browse files
committed
Reload the sidebar when removing submodule children. Without this the outline view will sometimes continue to load stale data that has been released and crash.
1 parent 5abb4d5 commit 1db49ab

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

PBGitSidebarController.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,8 @@ - (void) observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(
138138
[sourceView reloadData];
139139
} else if ([kObservingContextSubmodules isEqualToString:(__bridge NSString *)context]) {
140140
[submodules.children removeAllObjects];
141+
[sourceView reloadData]; //reload now otherwise the outline view may crash while loading old objects
142+
141143
NSArray *newSubmodules = [change objectForKey:NSKeyValueChangeNewKey];
142144

143145
for (PBGitSubmodule *submodule in newSubmodules) {

0 commit comments

Comments
 (0)