From e8676f63c673a15670f2685c6538639aed48d87a Mon Sep 17 00:00:00 2001 From: Seth Alves Date: Mon, 14 Jan 2019 13:50:56 -0800 Subject: [PATCH] release grab if scripts are reloaded before grab is released --- scripts/system/controllers/grab.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/system/controllers/grab.js b/scripts/system/controllers/grab.js index ca3b43bd37..3481639cc5 100644 --- a/scripts/system/controllers/grab.js +++ b/scripts/system/controllers/grab.js @@ -479,6 +479,10 @@ Grabber.prototype.keyPressEvent = function(event) { Grabber.prototype.cleanup = function() { Pointers.removePointer(this.mouseRayEntities); Picks.removePick(this.mouseRayOverlays); + if (this.grabID) { + MyAvatar.releaseGrab(this.grabID); + this.grabID = null; + } }; var grabber = new Grabber();