aboutsummaryrefslogtreecommitdiff
path: root/src/game/Mail.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/Mail.cpp')
-rw-r--r--src/game/Mail.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/game/Mail.cpp b/src/game/Mail.cpp
index 44513c671a5..12425866090 100644
--- a/src/game/Mail.cpp
+++ b/src/game/Mail.cpp
@@ -135,11 +135,10 @@ void WorldSession::HandleSendMail(WorldPacket & recv_data )
else
{
rc_team = objmgr.GetPlayerTeamByGUID(rc);
- if (QueryResult* result = CharacterDatabase.PQuery("SELECT COUNT(*) FROM mail WHERE receiver = '%u'", GUID_LOPART(rc)))
+ if (QueryResult_AutoPtr result = CharacterDatabase.PQuery("SELECT COUNT(*) FROM mail WHERE receiver = '%u'", GUID_LOPART(rc)))
{
Field *fields = result->Fetch();
mails_count = fields[0].GetUInt32();
- delete result;
}
}
//do not allow to have more than 100 mails in mailbox.. mails count is in opcode uint8!!! - so max can be 255..