mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Tickets: Fix crash in TicketMgr::ResetTickets()
This commit is contained in:
@@ -257,9 +257,17 @@ void TicketMgr::Initialize()
|
||||
|
||||
void TicketMgr::ResetTickets()
|
||||
{
|
||||
for (GmTicketList::const_iterator itr = _ticketList.begin(); itr != _ticketList.end(); ++itr)
|
||||
for (GmTicketList::const_iterator itr = _ticketList.begin(); itr != _ticketList.end();)
|
||||
{
|
||||
if (itr->second->IsClosed())
|
||||
sTicketMgr->RemoveTicket(itr->second->GetId());
|
||||
{
|
||||
uint32 ticketId = itr->second->GetId();
|
||||
++itr;
|
||||
sTicketMgr->RemoveTicket(ticketId);
|
||||
}
|
||||
else
|
||||
++itr;
|
||||
}
|
||||
|
||||
_lastTicketId = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user