mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 21:23:52 +00:00
Only update the icon if player is NOT unarmed, to avoid bad dereference.
This commit is contained in:
parent
bcacdc49af
commit
e695890e01
1 changed files with 4 additions and 1 deletions
|
@ -307,7 +307,10 @@ void MWState::StateManager::loadGame (const Character *character, const Slot *sl
|
|||
|
||||
//Update the weapon icon in the hud with whatever the player is currently holding.
|
||||
MWWorld::InventoryStore& invStore = ptr.getClass().getInventoryStore(ptr);
|
||||
MWBase::Environment::get().getWindowManager()->setSelectedWeapon(*invStore.getSlot(MWWorld::InventoryStore::Slot_CarriedRight));
|
||||
MWWorld::ContainerStoreIterator item = invStore.getSlot(MWWorld::InventoryStore::Slot_CarriedRight);
|
||||
|
||||
if (item != invStore.end())
|
||||
MWBase::Environment::get().getWindowManager()->setSelectedWeapon(*item);
|
||||
|
||||
ESM::CellId cellId = ptr.getCell()->getCell()->getCellId();
|
||||
|
||||
|
|
Loading…
Reference in a new issue