Don't return mails to non-existing characters (thanks to laviniu for finding the bug)

--HG--
branch : trunk
This commit is contained in:
click
2010-06-25 21:49:27 +02:00
parent 3d40804a33
commit 2b29d4e65d

View File

@@ -375,8 +375,8 @@ void WorldSession::HandleMailReturnToSender(WorldPacket & recv_data)
CharacterDatabase.CommitTransaction();
pl->RemoveMail(mailId);
// send back only to players and simple drop for other cases
if (m->messageType == MAIL_NORMAL)
// only return mail if the player exists (and delete if not existing)
if (m->messageType == MAIL_NORMAL && m->sender)
{
MailDraft draft(m->subject, m->body);
if (m->mailTemplateId)