1
0
mirror of https://github.com/Eugeny/tabby.git synced 2025-08-14 21:31:51 +00:00

don't crash when closing a background tab after recovery

This commit is contained in:
Eugene Pankov
2017-07-05 14:54:57 +02:00
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,8 +322,10 @@ export class TerminalTabComponent extends BaseTabComponent {
async destroy () { async destroy () {
super.destroy() super.destroy()
if (this.session) {
await this.session.destroy() await this.session.destroy()
} }
}
private setFontSize () { private setFontSize () {
preferenceManager.set('font-size', this.config.store.terminal.fontSize * Math.pow(1.1, this.zoom)) preferenceManager.set('font-size', this.config.store.terminal.fontSize * Math.pow(1.1, this.zoom))