mirror of
https://github.com/Eugeny/tabby.git
synced 2025-02-17 14:49:39 +08:00
don't crash when closing a background tab after recovery
This commit is contained in:
parent
e6ef21fa9d
commit
80762e92d6
@ -307,8 +307,10 @@ export class TerminalTabComponent extends BaseTabComponent {
|
||||
decorator.detach(this)
|
||||
})
|
||||
this.configSubscription.unsubscribe()
|
||||
this.sessionCloseSubscription.unsubscribe()
|
||||
this.hotkeysSubscription.unsubscribe()
|
||||
if (this.sessionCloseSubscription) {
|
||||
this.sessionCloseSubscription.unsubscribe()
|
||||
}
|
||||
this.resize$.complete()
|
||||
this.input$.complete()
|
||||
this.output$.complete()
|
||||
@ -320,7 +322,9 @@ export class TerminalTabComponent extends BaseTabComponent {
|
||||
|
||||
async destroy () {
|
||||
super.destroy()
|
||||
await this.session.destroy()
|
||||
if (this.session) {
|
||||
await this.session.destroy()
|
||||
}
|
||||
}
|
||||
|
||||
private setFontSize () {
|
||||
|
Loading…
Reference in New Issue
Block a user