From 748158ac92c1a88bd46fc2a3b49c490fc0dd1171 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 14 Feb 2016 22:38:20 +0300 Subject: Fix crash in char creation if stats was hidden (tmwa). --- src/gui/windows/charcreatedialog.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/gui') 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 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; -- cgit v1.2.3-70-g09d2