From 2c7623c9feb714a382795baf3408a4841a69bf52 Mon Sep 17 00:00:00 2001 From: Rochet2 Date: Mon, 19 Nov 2018 23:26:17 +0200 Subject: [PATCH] Fix segfault with VendorRemoveAllItems --- GlobalMethods.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GlobalMethods.h b/GlobalMethods.h index 5c87a37..24318c7 100644 --- a/GlobalMethods.h +++ b/GlobalMethods.h @@ -1895,7 +1895,7 @@ namespace LuaGlobalFunctions if (!items || items->Empty()) return 0; - auto const & itemlist = items->m_items; + auto const itemlist = items->m_items; for (auto itr = itemlist.begin(); itr != itemlist.end(); ++itr) #if defined(CATA) || defined(MISTS) eObjectMgr->RemoveVendorItem(entry, (*itr)->item, 1);