mirror of
https://github.com/mangosfour/server.git
synced 2025-12-18 10: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
|
do
|
||||||
{
|
{
|
||||||
Field *fields = arenaTeamMembersResult->Fetch();
|
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();
|
uint32 arenaTeamId = fields[0].GetUInt32();
|
||||||
if (arenaTeamId < m_TeamId)
|
if (arenaTeamId < m_TeamId)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -290,6 +290,9 @@ bool Guild::LoadRanksFromDB(QueryResult *guildRanksResult)
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
fields = guildRanksResult->Fetch();
|
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();
|
uint32 guildId = fields[0].GetUInt32();
|
||||||
if (guildId < m_Id)
|
if (guildId < m_Id)
|
||||||
|
|
@ -352,6 +355,9 @@ bool Guild::LoadMembersFromDB(QueryResult *guildMembersResult)
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
Field *fields = guildMembersResult->Fetch();
|
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();
|
uint32 guildId = fields[0].GetUInt32();
|
||||||
if (guildId < m_Id)
|
if (guildId < m_Id)
|
||||||
{
|
{
|
||||||
|
|
@ -1461,6 +1467,9 @@ bool Guild::LoadBankRightsFromDB(QueryResult *guildBankTabRightsResult)
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
Field *fields = guildBankTabRightsResult->Fetch();
|
Field *fields = guildBankTabRightsResult->Fetch();
|
||||||
|
//prevent crash when all rights in result are already processed
|
||||||
|
if (!fields)
|
||||||
|
break;
|
||||||
uint32 guildId = fields[0].GetUInt32();
|
uint32 guildId = fields[0].GetUInt32();
|
||||||
if (guildId < m_Id)
|
if (guildId < m_Id)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "8564"
|
#define REVISION_NR "8565"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue