【红点】报错优化

dev_chengFeng
gaoxin 2021-09-17 15:09:10 +08:00
parent a7ce05450b
commit 5f11f26c4d
1 changed files with 2 additions and 2 deletions

View File

@ -700,10 +700,10 @@ function this.RefreshRedObjectStatus(rpType)
local state = this.GetRedPointStatus(rpType)
if BindObjs[rpType] then
table.walk(BindObjs[rpType], function(bindObj)
if bindObj and bindObj.gameObject then
if bindObj and not IsNull(bindObj) and bindObj.gameObject then
bindObj.gameObject:SetActive(state == RedPointStatus.Show)
else
Log("红点类型 ".. rpType ..", 对应红点对象已销毁,但未清除绑定,请检查代码")
LogError("红点类型 ".. rpType ..", 对应红点对象已销毁,但未清除绑定,请检查代码")
end
end)
end