summaryrefslogtreecommitdiff
path: root/src/being
diff options
context:
space:
mode:
Diffstat (limited to 'src/being')
-rw-r--r--src/being/being.cpp7
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
{