summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-02-14 22:38:20 +0300
committerAndrei Karas <akaras@inbox.ru>2016-02-14 22:38:20 +0300
commit748158ac92c1a88bd46fc2a3b49c490fc0dd1171 (patch)
treedc24b9f6537b25cd0b9f3a6cc453f14d668a690c /src
parentb6f72a52c7a000f146c5aff3ab8318293cbb1c42 (diff)
downloadmv-748158ac92c1a88bd46fc2a3b49c490fc0dd1171.tar.gz
mv-748158ac92c1a88bd46fc2a3b49c490fc0dd1171.tar.bz2
mv-748158ac92c1a88bd46fc2a3b49c490fc0dd1171.tar.xz
mv-748158ac92c1a88bd46fc2a3b49c490fc0dd1171.zip
Fix crash in char creation if stats was hidden (tmwa).
Diffstat (limited to 'src')
-rw-r--r--src/gui/windows/charcreatedialog.cpp5
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;