mirror of
https://github.com/textmate/textmate.git
synced 2026-04-28 03:00:34 -04:00
Fix potential retain loop via document SCM callback
If we closed a window with a document SCM callback for the current document, but that document was untitled (so it wouldn’t be cleared during shutdown), we would keep ‘self’ retained.
This commit is contained in:
@@ -1113,7 +1113,7 @@ namespace
|
||||
{
|
||||
__weak DocumentController* weakSelf = self;
|
||||
_documentSCMInfo->add_callback(^(scm::info_t const& info){
|
||||
weakSelf.documentSCMStatus = info.status(to_s(self.documentPath));
|
||||
weakSelf.documentSCMStatus = info.status(to_s(weakSelf.documentPath));
|
||||
weakSelf.documentSCMVariables = info.variables();
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user