Fix crash if client disconnects/is logged out while door is running

This commit is contained in:
Bryan Ashby 2019-04-05 21:53:30 -06:00
parent 04c8167a15
commit 64de10cbf7
No known key found for this signature in database
GPG Key ID: B49EB437951D2542
1 changed files with 6 additions and 0 deletions

View File

@ -170,6 +170,12 @@ exports.getModule = class AbracadabraModule extends MenuModule {
this.doorInstance.run(exeInfo, () => {
trackDoorRunEnd(doorTracking);
// client may have disconnected while process was active -
// we're done here if so.
if(!this.client.term.output) {
return;
}
//
// Try to clean up various settings such as scroll regions that may
// have been set within the door