[11445] Correct a possible crash, if caster of aura has disconnected after aura applied

A small code adjustment in addition, no need for caster at aura remove.

Signed-off-by: NoFantasy <nofantasy@nf.no>
This commit is contained in:
NoFantasy 2011-05-08 19:47:59 +02:00
parent b62c7f17f0
commit 6d28c7dfd0
3 changed files with 8 additions and 6 deletions

View file

@ -638,7 +638,7 @@ void WorldSession::HandleGetMirrorimageData(WorldPacket& recv_data)
data << (uint8)pCreature->getGender();
data << (uint8)pCreature->getClass();
if (pCaster->GetTypeId() == TYPEID_PLAYER)
if (pCaster && pCaster->GetTypeId() == TYPEID_PLAYER)
{
Player* pPlayer = (Player*)pCaster;
@ -677,7 +677,9 @@ void WorldSession::HandleGetMirrorimageData(WorldPacket& recv_data)
}
else
{
// No data when cloner is not player, data is taken from CreatureDisplayInfoExtraEntry by model already
// pCaster may have been NULL (usually not expected, but may happen at disconnect, etc)
// OR
// pCaster is not player, data is taken from CreatureDisplayInfoExtraEntry by model already
data << (uint8)0;
data << (uint8)0;
data << (uint8)0;