diff options
| author | Duarte Duarte <dnpd.dd@gmail.com> | 2014-07-18 00:20:28 +0100 |
|---|---|---|
| committer | Duarte Duarte <dnpd.dd@gmail.com> | 2014-07-18 00:20:28 +0100 |
| commit | 99a4ea33627678bddf061f0e38428667dee49674 (patch) | |
| tree | 510887d5c4beb6a9125182b657f3209583fa95e7 /src | |
| parent | 25c68cc2d3e6e896e70dcd0e65b93eff7bc6e3c8 (diff) | |
Core/Players: Fix possible crash in ModifyArenaPoints and ModifyHonorPoints
Diffstat (limited to 'src')
| -rw-r--r-- | src/server/game/Entities/Player/Player.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 0651335de22..67865fde0d8 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -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); |
