fix(Core/Tickets): Fix crash in ticket complete command. (#21665)
This commit is contained in:
committed by
GitHub
parent
263f14d800
commit
3406cb03b3
@@ -199,7 +199,7 @@ public:
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool HandleGMTicketCompleteCommand(ChatHandler* handler, uint32 ticketId)
|
static bool HandleGMTicketCompleteCommand(ChatHandler* handler, uint32 ticketId, std::optional<std::string> response)
|
||||||
{
|
{
|
||||||
GmTicket* ticket = sTicketMgr->GetTicket(ticketId);
|
GmTicket* ticket = sTicketMgr->GetTicket(ticketId);
|
||||||
if (!ticket || ticket->IsClosed() || ticket->IsCompleted())
|
if (!ticket || ticket->IsClosed() || ticket->IsCompleted())
|
||||||
@@ -217,9 +217,8 @@ public:
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
char* response = strtok(nullptr, "\n");
|
|
||||||
if (response)
|
if (response)
|
||||||
ticket->AppendResponse(response);
|
ticket->AppendResponse(response.value());
|
||||||
|
|
||||||
if (Player* player2 = ticket->GetPlayer())
|
if (Player* player2 = ticket->GetPlayer())
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user