Fixed issue with image creation callbacks

This commit is contained in:
nathan 2017-01-31 01:09:52 +01:00
parent cddda292be
commit aaf319e9f4

View File

@ -282,7 +282,11 @@ class Notify {
if (name != null) {
imageIcon = imageIconCache.get(name);
if (imageIcon == null) {
imageIcon = new ImageIcon(graphic);
Image image = new ImageIcon(graphic).getImage();
// have to do this twice, so that it will finish loading the image (weird callback stuff is required if we don't do this)
imageIcon = new ImageIcon(image);
imageIconCache.put(name, imageIcon);
}
}