diff --git a/scripts/system/snapshot.js b/scripts/system/snapshot.js index 8f918c9cb2..55152ef245 100644 --- a/scripts/system/snapshot.js +++ b/scripts/system/snapshot.js @@ -211,8 +211,10 @@ Window.snapshotShared.connect(snapshotShared); Window.processingGif.connect(processingGif); Script.scriptEnding.connect(function () { - button.clicked.disconnect(onClicked); - buttonConnected = false; + if (buttonConnected) { + button.clicked.disconnect(onClicked); + buttonConnected = false; + } if (tablet) { tablet.removeButton(button); }