Don't throw an exception when equipping a bound item fails

pull/3057/head
Evil Eye 3 years ago
parent 580fa78034
commit 8e9bd5c0bd

@ -112,6 +112,7 @@
Bug #5899: Visible modal windows and dropdowns crashing game on exit
Bug #5902: NiZBufferProperty is unable to disable the depth test
Bug #5906: Sunglare doesn't work with Mesa drivers and AMD GPUs
Bug #5912: ImprovedBound mod doesn't work
Feature #390: 3rd person look "over the shoulder"
Feature #832: OpenMW-CS: Handle deleted references
Feature #1536: Show more information about level on menu

@ -346,7 +346,11 @@ namespace MWMechanics
if (actor != MWMechanics::getPlayer())
return;
MWWorld::Ptr newItem = *store.getSlot(slot);
MWWorld::Ptr newItem;
auto it = store.getSlot(slot);
// Equip can fail because beast races cannot equip boots/helmets
if(it != store.end())
newItem = *it;
if (newItem.isEmpty() || boundPtr != newItem)
return;

Loading…
Cancel
Save