mirror of
https://github.com/Eugeny/tabby.git
synced 2025-06-08 13:30:02 +00: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)
|
decorator.detach(this)
|
||||||
})
|
})
|
||||||
this.configSubscription.unsubscribe()
|
this.configSubscription.unsubscribe()
|
||||||
this.sessionCloseSubscription.unsubscribe()
|
|
||||||
this.hotkeysSubscription.unsubscribe()
|
this.hotkeysSubscription.unsubscribe()
|
||||||
|
if (this.sessionCloseSubscription) {
|
||||||
|
this.sessionCloseSubscription.unsubscribe()
|
||||||
|
}
|
||||||
this.resize$.complete()
|
this.resize$.complete()
|
||||||
this.input$.complete()
|
this.input$.complete()
|
||||||
this.output$.complete()
|
this.output$.complete()
|
||||||
@ -320,7 +322,9 @@ export class TerminalTabComponent extends BaseTabComponent {
|
|||||||
|
|
||||||
async destroy () {
|
async destroy () {
|
||||||
super.destroy()
|
super.destroy()
|
||||||
await this.session.destroy()
|
if (this.session) {
|
||||||
|
await this.session.destroy()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private setFontSize () {
|
private setFontSize () {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user