Fix NPE on System Theme

This commit is contained in:
Konloch 2024-09-29 20:11:05 -06:00
parent 5dab52bfd3
commit c29f0fbb21

AI 샘플 코드 생성 중입니다

Loading...

View File

@ -130,9 +130,14 @@ public class TabComponent extends JPanel
*/
private ScrollableTabPanel getTabPanel()
{
for (Component component : Objects.requireNonNull(viewport()).getComponents())
if (component instanceof ScrollableTabPanel)
return (ScrollableTabPanel) component;
DarkScrollableTabViewport viewport = viewport();
if(viewport != null)
{
for (Component component : viewport.getComponents())
if (component instanceof ScrollableTabPanel)
return (ScrollableTabPanel) component;
}
return null;
}