Core: Fix a possible crash in WorldSession::ProcessQueryCallbacks
Author: Cyberbrest Closes issue #5262 --HG-- branch : trunk
This commit is contained in:
@@ -867,7 +867,7 @@ class ObjectMgr
|
||||
void LoadCreatures();
|
||||
void LoadLinkedRespawn();
|
||||
bool SetCreatureLinkedRespawn(uint32 guid, uint32 linkedGuid);
|
||||
void LoadCreatureRespawnTimes();
|
||||
void LoadLinkedRespawnTimes();
|
||||
void LoadCreatureAddons();
|
||||
void LoadCreatureModelInfo();
|
||||
void LoadEquipmentTemplates();
|
||||
|
||||
@@ -58,7 +58,7 @@ void WorldSession::SendNameQueryOpcode(Player *p)
|
||||
|
||||
void WorldSession::SendNameQueryOpcodeFromDB(uint64 guid)
|
||||
{
|
||||
ACE_Future<QueryResult> lFutureResult =
|
||||
QueryResultFuture lFutureResult =
|
||||
CharacterDatabase.AsyncPQuery(
|
||||
!sWorld->getBoolConfig(CONFIG_DECLINED_NAMES_USED) ?
|
||||
// ------- Query Without Declined Names --------
|
||||
|
||||
@@ -1003,8 +1003,12 @@ void WorldSession::ProcessQueryCallbacks()
|
||||
if (m_nameQueryCallbacks.next_readable(lResult, &timeout) != 1)
|
||||
break;
|
||||
|
||||
if (lResult.ready())
|
||||
{
|
||||
lResult.get(result);
|
||||
SendNameQueryOpcodeFromDBCallBack(result);
|
||||
lResult.cancel();
|
||||
}
|
||||
}
|
||||
|
||||
//! HandleCharEnumOpcode
|
||||
|
||||
Reference in New Issue
Block a user