Merge pull request #400 from deathbeam/screenshot-fix
Fix NPE in ScreenShotPlugin
This commit is contained in:
@@ -169,10 +169,13 @@ public class ScreenshotPlugin extends Plugin
|
|||||||
SwingUtilities.invokeLater(() ->
|
SwingUtilities.invokeLater(() ->
|
||||||
{
|
{
|
||||||
JComponent titleBar = SubstanceCoreUtilities.getTitlePaneComponent(clientUi);
|
JComponent titleBar = SubstanceCoreUtilities.getTitlePaneComponent(clientUi);
|
||||||
titleBar.remove(titleBarButton);
|
|
||||||
|
|
||||||
clientUi.revalidate();
|
if (titleBar != null)
|
||||||
clientUi.repaint();
|
{
|
||||||
|
titleBar.remove(titleBarButton);
|
||||||
|
clientUi.revalidate();
|
||||||
|
clientUi.repaint();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user