diff options
Diffstat (limited to 'src/resources/beinginfo.cpp')
-rw-r--r-- | src/resources/beinginfo.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/resources/beinginfo.cpp b/src/resources/beinginfo.cpp index 361dead4d..f54673447 100644 --- a/src/resources/beinginfo.cpp +++ b/src/resources/beinginfo.cpp @@ -114,8 +114,8 @@ const SoundInfo &BeingInfo::getSound(const SoundEvent event) const static SoundInfo emptySound("", 0); const SoundEvents::const_iterator i = mSounds.find(event); - return (i == mSounds.end() || !i->second) ? emptySound : - i->second->at(rand() % i->second->size()); + return (i == mSounds.end() || !i->second || i->second->empty()) + ? emptySound : i->second->at(rand() % i->second->size()); } const Attack *BeingInfo::getAttack(const int id) const |