--- old/src/java.desktop/macosx/classes/sun/lwawt/macosx/CTrayIcon.java 2019-02-05 14:57:27.000000000 +0530 +++ new/src/java.desktop/macosx/classes/sun/lwawt/macosx/CTrayIcon.java 2019-02-05 14:57:26.000000000 +0530 @@ -357,7 +357,7 @@ class IconObserver implements ImageObserver { @Override public boolean imageUpdate(Image image, int flags, int x, int y, int width, int height) { - if (image != target.getImage()) // if the image has been changed + if (target == null || image != target.getImage()) //if the image has been changed { return false; }