mirror of
https://github.com/mangosfour/server.git
synced 2025-12-18 01:37:01 +00:00
[8565] Fixed crash added in [8560]. Thx to KAPATEJIb.
Signed-off-by: Triply <triply@getmangos.com>
This commit is contained in:
parent
8f31cf63bd
commit
8246a8c310
3 changed files with 13 additions and 1 deletions
|
|
@ -198,6 +198,9 @@ bool ArenaTeam::LoadMembersFromDB(QueryResult *arenaTeamMembersResult)
|
|||
do
|
||||
{
|
||||
Field *fields = arenaTeamMembersResult->Fetch();
|
||||
//prevent crash if db records are broken, when all members in result are already processed and current team hasn't got any members
|
||||
if (!fields)
|
||||
break;
|
||||
uint32 arenaTeamId = fields[0].GetUInt32();
|
||||
if (arenaTeamId < m_TeamId)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -290,6 +290,9 @@ bool Guild::LoadRanksFromDB(QueryResult *guildRanksResult)
|
|||
do
|
||||
{
|
||||
fields = guildRanksResult->Fetch();
|
||||
//condition that would be true when all ranks in QueryResult will be processed and guild without ranks is being processed
|
||||
if (!fields)
|
||||
break;
|
||||
|
||||
uint32 guildId = fields[0].GetUInt32();
|
||||
if (guildId < m_Id)
|
||||
|
|
@ -352,6 +355,9 @@ bool Guild::LoadMembersFromDB(QueryResult *guildMembersResult)
|
|||
do
|
||||
{
|
||||
Field *fields = guildMembersResult->Fetch();
|
||||
//this condition will be true when all rows in QueryResult are processed and new guild without members is going to be loaded - prevent crash
|
||||
if (!fields)
|
||||
break;
|
||||
uint32 guildId = fields[0].GetUInt32();
|
||||
if (guildId < m_Id)
|
||||
{
|
||||
|
|
@ -1461,6 +1467,9 @@ bool Guild::LoadBankRightsFromDB(QueryResult *guildBankTabRightsResult)
|
|||
do
|
||||
{
|
||||
Field *fields = guildBankTabRightsResult->Fetch();
|
||||
//prevent crash when all rights in result are already processed
|
||||
if (!fields)
|
||||
break;
|
||||
uint32 guildId = fields[0].GetUInt32();
|
||||
if (guildId < m_Id)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "8564"
|
||||
#define REVISION_NR "8565"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue