From 0854ed01a45810c1ecb158620960916fcb9269b7 Mon Sep 17 00:00:00 2001 From: peterbell10 Date: Mon, 21 Aug 2017 21:25:03 +0100 Subject: Fix use after move in cItemBowHandler::OnItemShoot --- src/Items/ItemBow.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/Items/ItemBow.h b/src/Items/ItemBow.h index 7cbd1dc70..67ea9f16f 100644 --- a/src/Items/ItemBow.h +++ b/src/Items/ItemBow.h @@ -1,4 +1,4 @@ - + // ItemBow.h // Declares the cItemBowHandler class representing the itemhandler for bows @@ -91,16 +91,15 @@ public: } else { - Arrow->SetPickupState(cArrowEntity::psNoPickup); + ArrowPtr->SetPickupState(cArrowEntity::psNoPickup); } - a_Player->UseEquippedItem(); } if (a_Player->GetEquippedItem().m_Enchantments.GetLevel(cEnchantments::enchFlame) > 0) { - Arrow->StartBurning(100); + ArrowPtr->StartBurning(100); } } } ; -- cgit v1.2.3