aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPWindowController.m
diff options
context:
space:
mode:
Diffstat (limited to 'Source/SPWindowController.m')
-rw-r--r--Source/SPWindowController.m6
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/SPWindowController.m b/Source/SPWindowController.m
index da23113b..89879b0f 100644
--- a/Source/SPWindowController.m
+++ b/Source/SPWindowController.m
@@ -541,6 +541,12 @@
if (![eachDocument parentTabShouldClose]) return NO;
}
+ // Remove global session data if the last window of a session will be closed
+ if([[NSApp delegate] sessionURL] && [[[NSApp delegate] orderedDatabaseConnectionWindows] count] == 1) {
+ [[NSApp delegate] setSessionURL:nil];
+ [[NSApp delegate] setSpfSessionDocData:nil];
+ }
+
return YES;
}