Core/Players: Fix possible crash in ModifyArenaPoints and ModifyHonorPoints
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user