fix "error in framelistener" when trying to pick up lights that can't be picked up

This commit is contained in:
scrawl 2012-07-05 17:13:23 +02:00
parent 78efc31641
commit 1a5203749f

View file

@ -310,6 +310,9 @@ namespace MWGui
&& (type != typeid(ESM::Potion).name())) && (type != typeid(ESM::Potion).name()))
return; return;
if (MWWorld::Class::get(object).getName(object) == "") // objects without name presented to user can never be picked up
return;
// sound // sound
std::string sound = MWWorld::Class::get(object).getUpSoundId(object); std::string sound = MWWorld::Class::get(object).getUpSoundId(object);
MWBase::Environment::get().getSoundManager()->playSound(sound, 1, 1); MWBase::Environment::get().getSoundManager()->playSound(sound, 1, 1);