Core/Groups: Fix a crash loading groups from DB

Fixes issue 3693

--HG--
branch : trunk
This commit is contained in:
Spp
2010-08-31 11:50:07 +02:00
parent b9e19572c4
commit 866c28fbec

View File

@@ -3645,7 +3645,10 @@ void ObjectMgr::LoadGroups()
group = GetGroupByGUID(groupLowGuid);
// group will never be NULL (we have run consistency sql's before loading)
}
group->LoadMemberFromDB(fields[1].GetUInt32(), fields[2].GetUInt8(), fields[3].GetUInt8());
if (group)
group->LoadMemberFromDB(fields[1].GetUInt32(), fields[2].GetUInt8(), fields[3].GetUInt8());
else
sLog.outError("ObjectMgr::LoadGroups: Consistency failed, can't find group (lowguid %u)", groupLowGuid);
++count;
}while (result->NextRow());