Fix NPE on System Theme
This commit is contained in:
parent
5dab52bfd3
commit
c29f0fbb21
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user