diff --git a/UnityProject/Assets/GameScripts/HotFix/GameLogic/UI/UIGiftItem.cs b/UnityProject/Assets/GameScripts/HotFix/GameLogic/UI/UIGiftItem.cs index dc0654ae..441078a4 100644 --- a/UnityProject/Assets/GameScripts/HotFix/GameLogic/UI/UIGiftItem.cs +++ b/UnityProject/Assets/GameScripts/HotFix/GameLogic/UI/UIGiftItem.cs @@ -35,6 +35,11 @@ namespace GameLogic //m_Group.sprite = GameModule.Resource.LoadAsset("Z_lw_t_box_" + (giftConfig.Id - 1)); + if (unitPlayerData == null) + { + Destroy(gameObject); + return; + } Log.Debug("送礼玩家阵营id:" + unitPlayerData.teamId);