diff --git a/server/imserver_new/guild/guildmgr.go b/server/imserver_new/guild/guildmgr.go index 6eff448f..a413eb1d 100644 --- a/server/imserver_new/guild/guildmgr.go +++ b/server/imserver_new/guild/guildmgr.go @@ -87,15 +87,27 @@ func (this *guildMgr) isNameTooLong(name string, maxNum int) bool { } func (this *guildMgr) GetGuildByGuildId(guildId string) common.Guild { - return this.internalGetGuildByGuildId(guildId) + if p := this.internalGetGuildByGuildId(guildId); p != nil { + return p + } else { + return nil + } } func (this *guildMgr) GetGuildByAccountId(accountId string) common.Guild { - return this.internalGetGuildByGuildId(accountId) + if p := this.internalGetGuildByAccountId(accountId); p != nil { + return p + } else { + return nil + } } func (this *guildMgr) GetGuildByGuildName(guildName string) common.Guild { - return this.internalGetGuildByGuildName(guildName) + if p := this.internalGetGuildByGuildName(guildName); p != nil { + return p + } else { + return nil + } } func (this *guildMgr) internalGetGuildByAccountId(accountId string) *guild {