diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 9d66db23bdf..8bf142f63a5 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,8 @@ +2005-04-27 Jeroen Frijters + + * javax/imageio/spi/IIORegistry.java (IIORegistry): + Don't assume that awt Toolkit is always ClasspathToolkit. + 2005-04-27 Chris Burdess * java/net/protocol/http/HTTPURLConnection.java (connect): Accept diff --git a/libjava/javax/imageio/spi/IIORegistry.java b/libjava/javax/imageio/spi/IIORegistry.java index 6531fabca10..01cfe5274c8 100644 --- a/libjava/javax/imageio/spi/IIORegistry.java +++ b/libjava/javax/imageio/spi/IIORegistry.java @@ -81,7 +81,9 @@ public final class IIORegistry extends ServiceRegistry // XXX: Register built-in Spis here. - ((ClasspathToolkit)Toolkit.getDefaultToolkit()).registerImageIOSpis(this); + Toolkit toolkit = Toolkit.getDefaultToolkit(); + if (toolkit instanceof ClasspathToolkit) + ((ClasspathToolkit)toolkit).registerImageIOSpis(this); registerApplicationClasspathSpis(); }