diff --git a/apps/openmw/mwmp/MechanicsHelper.cpp b/apps/openmw/mwmp/MechanicsHelper.cpp index 7e143ecfd..9118effaa 100644 --- a/apps/openmw/mwmp/MechanicsHelper.cpp +++ b/apps/openmw/mwmp/MechanicsHelper.cpp @@ -374,4 +374,6 @@ MWWorld::Ptr MechanicsHelper::getItemPtrFromStore(const mwmp::Item& item, MWWorl return *storeIterator; } } + + return 0; } diff --git a/apps/openmw/mwmp/processors/player/ProcessorPlayerItemUse.hpp b/apps/openmw/mwmp/processors/player/ProcessorPlayerItemUse.hpp index a19a316c0..43f8216e3 100644 --- a/apps/openmw/mwmp/processors/player/ProcessorPlayerItemUse.hpp +++ b/apps/openmw/mwmp/processors/player/ProcessorPlayerItemUse.hpp @@ -35,7 +35,7 @@ namespace mwmp MWWorld::Ptr &playerPtr = MWBase::Environment::get().getWorld()->getPlayerPtr(); MWWorld::InventoryStore &inventoryStore = playerPtr.getClass().getInventoryStore(playerPtr); - MWWorld::Ptr &itemPtr = MechanicsHelper::getItemPtrFromStore(player->usedItem, inventoryStore); + MWWorld::Ptr itemPtr = MechanicsHelper::getItemPtrFromStore(player->usedItem, inventoryStore); MWBase::Environment::get().getWindowManager()->getInventoryWindow()->useItem(itemPtr); } }