release grab if scripts are reloaded before grab is released

This commit is contained in:
Seth Alves 2019-01-14 13:50:56 -08:00
parent 2515c7f73e
commit e8676f63c6

View file

@ -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();