diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-02-14 22:38:20 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-02-14 22:38:20 +0300 |
commit | 748158ac92c1a88bd46fc2a3b49c490fc0dd1171 (patch) | |
tree | dc24b9f6537b25cd0b9f3a6cc453f14d668a690c /src/gui/windows/charcreatedialog.cpp | |
parent | b6f72a52c7a000f146c5aff3ab8318293cbb1c42 (diff) | |
download | plus-748158ac92c1a88bd46fc2a3b49c490fc0dd1171.tar.gz plus-748158ac92c1a88bd46fc2a3b49c490fc0dd1171.tar.bz2 plus-748158ac92c1a88bd46fc2a3b49c490fc0dd1171.tar.xz plus-748158ac92c1a88bd46fc2a3b49c490fc0dd1171.zip |
Fix crash in char creation if stats was hidden (tmwa).
Diffstat (limited to 'src/gui/windows/charcreatedialog.cpp')
-rw-r--r-- | src/gui/windows/charcreatedialog.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gui/windows/charcreatedialog.cpp b/src/gui/windows/charcreatedialog.cpp index 1375b4b25..420d20c1c 100644 --- a/src/gui/windows/charcreatedialog.cpp +++ b/src/gui/windows/charcreatedialog.cpp @@ -438,11 +438,14 @@ void CharCreateDialog::action(const ActionEvent &event) mCreateButton->setEnabled(false); std::vector<int> atts; - for (size_t i = 0, sz = mAttributeSlider.size(); i < sz; i++) + const size_t sz = mAttributeSlider.size(); + for (size_t i = 0; i < sz; i++) { atts.push_back(CAST_S32( mAttributeSlider[i]->getValue())); } + for (size_t i = sz; i < 6; i ++) + atts.push_back(1); const int characterSlot = mSlot; |