diff --git a/js/ui/main.js b/js/ui/main.js index a155ba8828..b487c161b9 100644 --- a/js/ui/main.js +++ b/js/ui/main.js @@ -1608,7 +1608,10 @@ function showEndSessionDialog(mode) { } endSessionDialog = new EndSessionDialog(mode); - endSessionDialog.open(); + if (!endSessionDialog.open()) { + endSessionDialog = null; + global.logWarning("Failed to open end session dialog"); + } } function closeEndSessionDialog() {