fix:邀请对局空指针异常
This commit is contained in:
parent
59f772c519
commit
905ff11095
|
|
@ -301,11 +301,13 @@ func (this *CSInviteFriendHandler) Process(s *netlib.Session, packetid int, data
|
|||
SrcHead: proto.Int32(p.Head),
|
||||
SrcHeadUrl: proto.String(p.HeadUrl),
|
||||
OpRetCode: opRetCode,
|
||||
GameId: proto.Int(p.scene.gameId),
|
||||
RoomId: proto.Int(p.scene.sceneId),
|
||||
Pos: proto.Int32(msg.GetPos()),
|
||||
RoleId: int32(roleId),
|
||||
}
|
||||
if p.scene != nil {
|
||||
pack.GameId = int32(p.scene.gameId)
|
||||
pack.RoomId = int32(p.scene.sceneId)
|
||||
}
|
||||
proto.SetDefaults(pack)
|
||||
player.SendToClient(int(friend.FriendPacketID_PACKET_SCInviteFriend), pack)
|
||||
logger.Logger.Trace("SCInviteFriendHandler: ", pack)
|
||||
|
|
|
|||
Loading…
Reference in New Issue