Skip to content
Snippets Groups Projects
Commit 68faf1c9 authored by George Nachman's avatar George Nachman
Browse files

Prevent calls to retainWindow:withTab with a nil tab, which apparently happens...

Prevent calls to retainWindow:withTab with a nil tab, which apparently happens although I don't know how or why. There was a crash log.
parent 6b5442b3
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -557,8 +557,13 @@ static NSString *kListWindowsFormat = @"\"#{session_name}\t#{window_id}\t"
- (void)registerSession:(PTYSession *)aSession
withPane:(int)windowPane
inWindow:(int)window {
[self retainWindow:window withTab:[aSession.delegate.realParentWindow tabForSession:aSession]];
[windowPanes_ setObject:aSession forKey:[self _keyForWindowPane:windowPane]];
PTYTab *tab = [aSession.delegate.realParentWindow tabForSession:aSession];
ITCriticalError(tab != nil, @"nil tab for session %@ with delegate %@ with realparentwindow %@",
aSession, aSession.delegate, aSession.delegate.realParentWindow);
if (tab) {
[self retainWindow:window withTab:tab];
[windowPanes_ setObject:aSession forKey:[self _keyForWindowPane:windowPane]];
}
}
 
- (void)deregisterWindow:(int)window windowPane:(int)windowPane session:(id)session
Loading
Loading
@@ -1716,6 +1721,7 @@ static NSString *kListWindowsFormat = @"\"#{session_name}\t#{window_id}\t"
 
- (void)retainWindow:(int)window withTab:(PTYTab *)tab
{
assert(tab);
NSNumber *k = [NSNumber numberWithInt:window];
NSMutableArray *entry = [windows_ objectForKey:k];
BOOL notify = NO;
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment