diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-06-24 17:42:53 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-06-24 17:42:53 +0300 |
commit | 05abb208b47329b60a3cbbef86f8bc88f91ab5de (patch) | |
tree | f4514088817583404ab32538cfb51b342ba9da51 | |
parent | 2399c209dd3429ac2629e91d8cd2219e1e15c7db (diff) | |
download | mv-05abb208b47329b60a3cbbef86f8bc88f91ab5de.tar.gz mv-05abb208b47329b60a3cbbef86f8bc88f91ab5de.tar.bz2 mv-05abb208b47329b60a3cbbef86f8bc88f91ab5de.tar.xz mv-05abb208b47329b60a3cbbef86f8bc88f91ab5de.zip |
Fix crash in char creation if client data corrupted.
-rw-r--r-- | src/gui/charcreatedialog.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gui/charcreatedialog.cpp b/src/gui/charcreatedialog.cpp index 52e59f095..6a2ad0bf3 100644 --- a/src/gui/charcreatedialog.cpp +++ b/src/gui/charcreatedialog.cpp @@ -501,7 +501,10 @@ void CharCreateDialog::updateHair() mHairStyleNameLabel->setCaption(item.getName()); mHairStyleNameLabel->adjustSize(); - mHairColor %= ColorDB::getHairSize(); + if (ColorDB::getHairSize()) + mHairColor %= ColorDB::getHairSize(); + else + mHairColor = 0; if (mHairColor < 0) mHairColor += ColorDB::getHairSize(); if (mHairColor < static_cast<signed>(minHairColor) |