From 4cbc110408555c690f4b581aac187b6a8d55bcfd Mon Sep 17 00:00:00 2001 From: Machiavelli Date: Mon, 5 Oct 2009 16:20:02 +0200 Subject: [PATCH] * Attempt to fix a crash in AuctionHouseObject::Update() --HG-- branch : trunk --- src/game/AuctionHouseMgr.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/game/AuctionHouseMgr.cpp b/src/game/AuctionHouseMgr.cpp index af242455f5c..a57456a71c6 100644 --- a/src/game/AuctionHouseMgr.cpp +++ b/src/game/AuctionHouseMgr.cpp @@ -504,10 +504,16 @@ void AuctionHouseObject::Update() time_t curTime = sWorld.GetGameTime(); ///- Handle expired auctions + // If storage is empty, no need to update. + if (AuctionsMap.empty()) + return; + // reset next if at end of map if (next == AuctionsMap.end()) next = AuctionsMap.begin(); + ASSERT(next != NULL); + uint32 loopBreaker = 0; // Initialize itr with next. next is stored for future calls to Update() after