* Attempt to fix a crash in AuctionHouseObject::Update()
--HG-- branch : trunk
This commit is contained in:
@@ -504,10 +504,16 @@ void AuctionHouseObject::Update()
|
|||||||
time_t curTime = sWorld.GetGameTime();
|
time_t curTime = sWorld.GetGameTime();
|
||||||
///- Handle expired auctions
|
///- Handle expired auctions
|
||||||
|
|
||||||
|
// If storage is empty, no need to update.
|
||||||
|
if (AuctionsMap.empty())
|
||||||
|
return;
|
||||||
|
|
||||||
// reset next if at end of map
|
// reset next if at end of map
|
||||||
if (next == AuctionsMap.end())
|
if (next == AuctionsMap.end())
|
||||||
next = AuctionsMap.begin();
|
next = AuctionsMap.begin();
|
||||||
|
|
||||||
|
ASSERT(next != NULL);
|
||||||
|
|
||||||
uint32 loopBreaker = 0;
|
uint32 loopBreaker = 0;
|
||||||
|
|
||||||
// Initialize itr with next. next is stored for future calls to Update() after
|
// Initialize itr with next. next is stored for future calls to Update() after
|
||||||
|
|||||||
Reference in New Issue
Block a user