diff --git a/worldsrv/bagmgr.go b/worldsrv/bagmgr.go index 7d68024..0a07a07 100644 --- a/worldsrv/bagmgr.go +++ b/worldsrv/bagmgr.go @@ -190,6 +190,9 @@ func (this *BagMgr) AddItems(p *Player, addItems []*Item, add int64, gainWay int continue } item := srvdata.GameItemMgr.Get(p.Platform, v.ItemId) + if item == nil { + continue + } switch item.Type { case common.ItemTypeCoin: //增加金币