Core/Players: Fix possible crash in ModifyArenaPoints and ModifyHonorPoints

This commit is contained in:
Duarte Duarte
2014-07-18 00:20:28 +01:00
parent 25c68cc2d3
commit 99a4ea3362
+2 -2
View File
@@ -7297,7 +7297,7 @@ void Player::ModifyHonorPoints(int32 value, SQLTransaction* trans /*=NULL*/)
newValue = 0;
SetHonorPoints(uint32(newValue));
if (trans)
if (trans && (*trans))
{
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_CHAR_HONOR_POINTS);
stmt->setUInt32(0, newValue);
@@ -7313,7 +7313,7 @@ void Player::ModifyArenaPoints(int32 value, SQLTransaction* trans /*=NULL*/)
newValue = 0;
SetArenaPoints(uint32(newValue));
if (trans)
if (trans && (*trans))
{
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_CHAR_ARENA_POINTS);
stmt->setUInt32(0, newValue);