From 64de10cbf7481989c8408b71d0fa614e113255f3 Mon Sep 17 00:00:00 2001 From: Bryan Ashby Date: Fri, 5 Apr 2019 21:53:30 -0600 Subject: [PATCH] Fix crash if client disconnects/is logged out while door is running --- core/abracadabra.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/abracadabra.js b/core/abracadabra.js index 34374049..36a58544 100644 --- a/core/abracadabra.js +++ b/core/abracadabra.js @@ -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