Browse Source

Merge pull request #122 from nichtsen/master

fix nil pointer check for player
master
刘丹冰 3 years ago
committed by GitHub
parent
commit
17b67feceb
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      zinx_app_demo/mmo_game/server.go

2
zinx_app_demo/mmo_game/server.go

@ -41,7 +41,7 @@ func OnConnectionLost(conn ziface.IConnection) {
player := core.WorldMgrObj.GetPlayerByPID(pID.(int32))
//触发玩家下线业务
if pID != nil {
if player != nil {
player.LostConnection()
}

Loading…
Cancel
Save