diff options
author | Alexander Tkachev | 2016-06-05 21:07:36 +0600 |
---|---|---|
committer | Alexander Tkachev | 2016-08-24 16:07:55 +0600 |
commit | 3db80154d60c98fe27018dc78c875df52c20cfe9 (patch) | |
tree | dd392281722eb7efb0d289a2dca8fcebf680e933 /gui/saveload-dialog.cpp | |
parent | e9721976aa4fc604810cf1daf6d60b206197cd9a (diff) | |
download | scummvm-rg350-3db80154d60c98fe27018dc78c875df52c20cfe9.tar.gz scummvm-rg350-3db80154d60c98fe27018dc78c875df52c20cfe9.tar.bz2 scummvm-rg350-3db80154d60c98fe27018dc78c875df52c20cfe9.zip |
CLOUD: Fix SaveLoadCloudSyncProgressDialog crash
It's closing itself a bit later now.
Diffstat (limited to 'gui/saveload-dialog.cpp')
-rw-r--r-- | gui/saveload-dialog.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/gui/saveload-dialog.cpp b/gui/saveload-dialog.cpp index e5e71a73b8..bdae9efea4 100644 --- a/gui/saveload-dialog.cpp +++ b/gui/saveload-dialog.cpp @@ -46,7 +46,7 @@ enum { kBackgroundSyncCmd = 'PDBS' }; -SaveLoadCloudSyncProgressDialog::SaveLoadCloudSyncProgressDialog(): Dialog(10, 10, 320, 100) { +SaveLoadCloudSyncProgressDialog::SaveLoadCloudSyncProgressDialog(): Dialog(10, 10, 320, 100), _close(false) { int x = 10; int buttonHeight = 24; int buttonWidth = 140; @@ -77,14 +77,22 @@ void SaveLoadCloudSyncProgressDialog::handleCommand(CommandSender *sender, uint3 case kSavesSyncEndedCmd: case kBackgroundSyncCmd: - setResult(kBackgroundSyncCmd); - close(); + _close = true; break; } Dialog::handleCommand(sender, cmd, data); } +void SaveLoadCloudSyncProgressDialog::handleTickle() { + if (_close) { + setResult(kBackgroundSyncCmd); + close(); + } + + Dialog::handleTickle(); +} + #ifndef DISABLE_SAVELOADCHOOSER_GRID SaveLoadChooserType getRequestedSaveLoadDialog(const MetaEngine &metaEngine) { const Common::String &userConfig = ConfMan.get("gui_saveload_chooser", Common::ConfigManager::kApplicationDomain); |