mirror of
https://github.com/Mezeporta/Erupe.git
synced 2025-12-12 15:04:38 +01:00
prevent nil pointer in MhfGetGuildManageRight
This commit is contained in:
@@ -1526,7 +1526,7 @@ func handleMsgMhfGetGuildManageRight(s *Session, p mhfpacket.MHFPacket) {
|
|||||||
pkt := p.(*mhfpacket.MsgMhfGetGuildManageRight)
|
pkt := p.(*mhfpacket.MsgMhfGetGuildManageRight)
|
||||||
|
|
||||||
guild, err := GetGuildInfoByCharacterId(s, s.charID)
|
guild, err := GetGuildInfoByCharacterId(s, s.charID)
|
||||||
if guild == nil && s.prevGuildID != 0 {
|
if guild == nil || s.prevGuildID != 0 {
|
||||||
guild, err = GetGuildInfoByID(s, s.prevGuildID)
|
guild, err = GetGuildInfoByID(s, s.prevGuildID)
|
||||||
s.prevGuildID = 0
|
s.prevGuildID = 0
|
||||||
if guild == nil || err != nil {
|
if guild == nil || err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user