From 1a5203749f6800e6674583ecdfb82f890fec80ff Mon Sep 17 00:00:00 2001 From: scrawl Date: Thu, 5 Jul 2012 17:13:23 +0200 Subject: [PATCH] fix "error in framelistener" when trying to pick up lights that can't be picked up --- apps/openmw/mwgui/inventorywindow.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/openmw/mwgui/inventorywindow.cpp b/apps/openmw/mwgui/inventorywindow.cpp index dc5728283..23a96b1d3 100644 --- a/apps/openmw/mwgui/inventorywindow.cpp +++ b/apps/openmw/mwgui/inventorywindow.cpp @@ -310,6 +310,9 @@ namespace MWGui && (type != typeid(ESM::Potion).name())) return; + if (MWWorld::Class::get(object).getName(object) == "") // objects without name presented to user can never be picked up + return; + // sound std::string sound = MWWorld::Class::get(object).getUpSoundId(object); MWBase::Environment::get().getSoundManager()->playSound(sound, 1, 1);