aboutsummaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
Diffstat (limited to 'gui')
-rw-r--r--gui/storagewizarddialog.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/gui/storagewizarddialog.cpp b/gui/storagewizarddialog.cpp
index 60f31d1e38..8dcea1c774 100644
--- a/gui/storagewizarddialog.cpp
+++ b/gui/storagewizarddialog.cpp
@@ -242,10 +242,12 @@ void StorageWizardDialog::handleCommand(CommandSender *sender, uint32 cmd, uint3
code += subcode;
code.deleteLastChar();
}
- code.erase(code.size() - 3);
- CloudMan.connectStorage(_storageId, code);
- setResult(1);
- close();
+ if (code.size() > 3) {
+ code.erase(code.size() - 3);
+ CloudMan.connectStorage(_storageId, code);
+ setResult(1);
+ close();
+ }
break;
}
#ifdef USE_SDL_NET