diff options
Diffstat (limited to 'src/being/being.cpp')
-rw-r--r-- | src/being/being.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/being/being.cpp b/src/being/being.cpp index f020de3da..b7f545918 100644 --- a/src/being/being.cpp +++ b/src/being/being.cpp @@ -2615,8 +2615,13 @@ void Being::setHairColor(const unsigned int slot, const ItemColor color) restrict2 { mHairColor = color; - setSprite(slot, mSpriteIDs[slot], ItemDB::get( - getSpriteID(slot)).getDyeColorsString(color)); + const int id = getSpriteID(slot); + if (id != 0) + { + setSprite(slot, + mSpriteIDs[slot], + ItemDB::get(id).getDyeColorsString(color)); + } } void Being::dumpSprites() const restrict2 |