浏览代码

Bugly服装合成防止报错增加判null处理

huangxiaoyue 1 年之前
父节点
当前提交
64cfe01872
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      GameClient/Assets/Game/HotUpdate/Views/ClothingSynthetic/ClothingSyntheticView.cs

+ 5 - 0
GameClient/Assets/Game/HotUpdate/Views/ClothingSynthetic/ClothingSyntheticView.cs

@@ -377,6 +377,11 @@ namespace GFGGame
             int index = (int)(context.data as GObject).data;
             _ui.m_listMaterias.selectedIndex = index;
             ItemData itemData = _materiarsOfSelectedItem[index];
+            if (itemData == null)
+            {
+                ET.Log.Error("OnClickMateriasItemPlus itemData is null");
+                return;
+            }
             object[] sourceDatas = new object[] { itemData.id, new object[] { typeof(ClothingSyntheticView).FullName, new object[] { _suitId, _selectedItemId } }, (int)itemData.num };
             GoodsItemTipsController.ShowItemTips(itemData.id, sourceDatas);
         }