mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 18:52:22 +00:00
[Bug Fix] Added additional Guild-related crash checks (#4105)
This commit is contained in:
@@ -369,6 +369,10 @@ bool WorldGuildManager::LoadTributes()
|
||||
bool WorldGuildManager::RefreshGuild(uint32 guild_id)
|
||||
{
|
||||
auto temp_guild = GetGuildByGuildID(guild_id);
|
||||
if (!temp_guild) {
|
||||
return false;
|
||||
}
|
||||
|
||||
BaseGuildManager::GuildInfo temp_guild_detail;
|
||||
|
||||
if (temp_guild) {
|
||||
@@ -389,6 +393,11 @@ bool WorldGuildManager::RefreshGuild(uint32 guild_id)
|
||||
LogGuilds("Found guild id [{}]. Loading details.....", db_guild.id);
|
||||
_CreateGuild(db_guild.id, db_guild.name, db_guild.leader, db_guild.minstatus, db_guild.motd, db_guild.motd_setter, db_guild.channel, db_guild.url, db_guild.favor);
|
||||
auto guild = GetGuildByGuildID(guild_id);
|
||||
if (!guild) {
|
||||
LogError("Error refreshing guild id {}", guild_id);
|
||||
return false;
|
||||
}
|
||||
|
||||
auto where_filter = fmt::format("guild_id = '{}'", guild_id);
|
||||
auto guild_ranks = GuildRanksRepository::GetWhere(*m_db, where_filter);
|
||||
for (auto const& r : guild_ranks) {
|
||||
|
||||
Reference in New Issue
Block a user