aboutsummaryrefslogtreecommitdiff
path: root/src/game/Group.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/Group.cpp')
-rw-r--r--src/game/Group.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/game/Group.cpp b/src/game/Group.cpp
index 0d9fc5eadf7..1bc542ec08a 100644
--- a/src/game/Group.cpp
+++ b/src/game/Group.cpp
@@ -116,7 +116,10 @@ bool Group::Create(const uint64 &guid, const char * name)
}
if (!AddMember(guid, name))
+ {
+ CharacterDatabase.RollbackTransaction();
return false;
+ }
if (!isBGGroup()) CharacterDatabase.CommitTransaction();
@@ -1288,7 +1291,7 @@ void Group::_setLeader(const uint64 &guid)
"DELETE FROM group_instance WHERE leaderguid='%u' AND (permanent = 1 OR "
"instance IN (SELECT instance FROM character_instance WHERE guid = '%u')"
")", GUID_LOPART(m_leaderGuid), GUID_LOPART(slot->guid)
-);
+ );
Player *player = objmgr.GetPlayer(slot->guid);
if (player)