From f2f4af259037ff97823cbb38691f4e1c0a8b560c Mon Sep 17 00:00:00 2001 From: Valerie Young Date: Fri, 11 Jan 2019 16:47:42 -0500 Subject: [PATCH] Don't send disconnect to a closed device --- src/extensions/scratch3_gdx_for/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/extensions/scratch3_gdx_for/index.js b/src/extensions/scratch3_gdx_for/index.js index ea38f96b1..df83d8459 100644 --- a/src/extensions/scratch3_gdx_for/index.js +++ b/src/extensions/scratch3_gdx_for/index.js @@ -107,6 +107,7 @@ class GdxFor { disconnect () { if (this._device) { this._device.close(); + this._device = null; this._sensorsEnabled = false; } }