Skip to content

Commit

Permalink
avoid NPE when loading the help fails
Browse files Browse the repository at this point in the history
  • Loading branch information
cpesch committed Jan 25, 2024
1 parent e2ab9a3 commit 12a3ff4
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ public void run() throws HelpSetException, MalformedURLException {
CSH.DisplayHelpFromFocus helpFromFocus = new CSH.DisplayHelpFromFocus(broker);
helpFromFocus.actionPerformed(getEvent());
final Window window = ((DefaultHelpBroker) broker).getWindowPresentation().getHelpWindow();
window.setIconImage(WindowHelper.getFrame().getIconImage());
if (window != null)
window.setIconImage(WindowHelper.getFrame().getIconImage());
if (window instanceof JFrame) {
JRootPane rootPane = ((JFrame) window).getRootPane();
rootPane.registerKeyboardAction(new ActionListener() {
Expand Down

0 comments on commit 12a3ff4

Please sign in to comment.