diff options
Diffstat (limited to 'src/game.cpp')
-rw-r--r-- | src/game.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/game.cpp b/src/game.cpp index 813253ce..226d275a 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -601,11 +601,21 @@ void Game::handleInput() } used = true; break; - // Quitting confirmation dialog - case KeyboardConfig::KEY_QUIT: + case KeyboardConfig::KEY_QUIT: + { + // Close possible stuck NPC dialogs. + NpcDialog *npcDialog = NpcDialog::getActive(); + if (npcDialog && npcDialog->isWaitingForTheServer()) + { + npcDialog->close(); + return; + } + + // Otherwise, show the quit confirmation dialog. quitDialog = new QuitDialog(&quitDialog); quitDialog->requestMoveToTop(); return; + } default: break; } |