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 LoadCreatures();
|
||||||
void LoadLinkedRespawn();
|
void LoadLinkedRespawn();
|
||||||
bool SetCreatureLinkedRespawn(uint32 guid, uint32 linkedGuid);
|
bool SetCreatureLinkedRespawn(uint32 guid, uint32 linkedGuid);
|
||||||
void LoadCreatureRespawnTimes();
|
void LoadLinkedRespawnTimes();
|
||||||
void LoadCreatureAddons();
|
void LoadCreatureAddons();
|
||||||
void LoadCreatureModelInfo();
|
void LoadCreatureModelInfo();
|
||||||
void LoadEquipmentTemplates();
|
void LoadEquipmentTemplates();
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ void WorldSession::SendNameQueryOpcode(Player *p)
|
|||||||
|
|
||||||
void WorldSession::SendNameQueryOpcodeFromDB(uint64 guid)
|
void WorldSession::SendNameQueryOpcodeFromDB(uint64 guid)
|
||||||
{
|
{
|
||||||
ACE_Future<QueryResult> lFutureResult =
|
QueryResultFuture lFutureResult =
|
||||||
CharacterDatabase.AsyncPQuery(
|
CharacterDatabase.AsyncPQuery(
|
||||||
!sWorld->getBoolConfig(CONFIG_DECLINED_NAMES_USED) ?
|
!sWorld->getBoolConfig(CONFIG_DECLINED_NAMES_USED) ?
|
||||||
// ------- Query Without Declined Names --------
|
// ------- Query Without Declined Names --------
|
||||||
|
|||||||
@@ -1003,8 +1003,12 @@ void WorldSession::ProcessQueryCallbacks()
|
|||||||
if (m_nameQueryCallbacks.next_readable(lResult, &timeout) != 1)
|
if (m_nameQueryCallbacks.next_readable(lResult, &timeout) != 1)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
lResult.get(result);
|
if (lResult.ready())
|
||||||
SendNameQueryOpcodeFromDBCallBack(result);
|
{
|
||||||
|
lResult.get(result);
|
||||||
|
SendNameQueryOpcodeFromDBCallBack(result);
|
||||||
|
lResult.cancel();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//! HandleCharEnumOpcode
|
//! HandleCharEnumOpcode
|
||||||
|
|||||||
Reference in New Issue
Block a user