diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-07-21 00:47:44 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-07-21 00:47:44 +0300 |
commit | fffbd86a1014ad169ed2d68ea58cdddf346faa14 (patch) | |
tree | 713c96fcf7421ca87f638d312e752179281cb8fe /src/being/being.cpp | |
parent | 1941b81a5a278f26a5d7e1f91903ab04c92e2cd1 (diff) | |
download | mv-fffbd86a1014ad169ed2d68ea58cdddf346faa14.tar.gz mv-fffbd86a1014ad169ed2d68ea58cdddf346faa14.tar.bz2 mv-fffbd86a1014ad169ed2d68ea58cdddf346faa14.tar.xz mv-fffbd86a1014ad169ed2d68ea58cdddf346faa14.zip |
Add missing checks and non null attributes.
Diffstat (limited to 'src/being/being.cpp')
-rw-r--r-- | src/being/being.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/being/being.cpp b/src/being/being.cpp index bf05eb7eb..746cc729b 100644 --- a/src/being/being.cpp +++ b/src/being/being.cpp @@ -3611,7 +3611,7 @@ void Being::addItemParticles(const int id, const SpriteDisplay &display) pi = (*it).second; } - if (!pi->particles.empty()) + if (!pi || !pi->particles.empty()) return; // setup particle effects @@ -3735,7 +3735,10 @@ void Being::setRiding(const bool b) if (b) { mHorseInfo = HorseDB::get(1); - mHorseSprite = mHorseInfo->sprite; + if (mHorseInfo) + mHorseSprite = mHorseInfo->sprite; + else + mHorseSprite = nullptr; } else { |