From c9e8799392145fca17409d3eafe094619a9a5f04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91=E4=BD=A9=E8=8C=B9?= Date: Tue, 19 Apr 2022 10:43:21 -0600 Subject: [PATCH] Fix crash when reporting item destroyed to master --- src/strategy/actions/DestroyItemAction.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/strategy/actions/DestroyItemAction.cpp b/src/strategy/actions/DestroyItemAction.cpp index 4f150833..4318a738 100644 --- a/src/strategy/actions/DestroyItemAction.cpp +++ b/src/strategy/actions/DestroyItemAction.cpp @@ -27,11 +27,11 @@ void DestroyItemAction::DestroyItem(FindItemVisitor* visitor) std::vector items = visitor->GetResult(); for (Item* item : items) { - bot->DestroyItem(item->GetBagSlot(),item->GetSlot(), true); - std::ostringstream out; out << chat->FormatItem(item->GetTemplate()) << " destroyed"; botAI->TellMaster(out); + + bot->DestroyItem(item->GetBagSlot(),item->GetSlot(), true); } }