Prevent crash at access to deleted social data for player.

Remove social data at logout instead ~Player that called also for temporary Player object for Player::MinimalLoadFromDB call.
This commit is contained in:
VladimirMangos 2008-10-27 18:47:13 +03:00
parent 9e6390d88d
commit 74ddd38af3
3 changed files with 4 additions and 5 deletions

View file

@ -4945,7 +4945,7 @@ void Spell::EffectDuel(uint32 i)
Player *target = (Player*)unitTarget;
// caster or target already have requested duel
if( caster->duel || target->duel || target->GetSocial()->HasIgnore(caster->GetGUIDLow()) )
if( caster->duel || target->duel || !target->GetSocial() || target->GetSocial()->HasIgnore(caster->GetGUIDLow()) )
return;
// Players can only fight a duel with each other outside (=not inside dungeons and not in capital cities)