leiyasi 1 год назад
Родитель
Сommit
593df76c75
1 измененных файлов с 2 добавлено и 0 удалено
  1. 2 0
      GameClient/Assets/Game/HotUpdate/Views/Friend/FriendView.cs

+ 2 - 0
GameClient/Assets/Game/HotUpdate/Views/Friend/FriendView.cs

@@ -246,7 +246,9 @@ namespace GFGGame
             int selectedIndex = 0;
             if (_ui.m_list.numItems > 0)
             {
+                if (_ui.m_list.selectedIndex < 0) return;
                 _ui.m_list.ScrollToView(_ui.m_list.selectedIndex);
+
                 int childIndex = _ui.m_list.ItemIndexToChildIndex(_ui.m_list.selectedIndex);
                 if (childIndex < 0) return;
                 GButton item = _ui.m_list.GetChildAt(childIndex).asButton.GetChild("btnSend").asButton;