You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-dev@xmlgraphics.apache.org by de...@apache.org on 2003/03/04 23:52:15 UTC

cvs commit: xml-batik/sources/org/apache/batik/ext/awt/image/spi JDKRegistryEntry.java

deweese     2003/03/04 14:52:15

  Modified:    sources/org/apache/batik/ext/awt/image/spi
                        JDKRegistryEntry.java
  Log:
  Fixed a bug when corrupt files are given to the JDKRegistryEntry it would
  throw an exception.
  
  Revision  Changes    Path
  1.7       +2 -0      xml-batik/sources/org/apache/batik/ext/awt/image/spi/JDKRegistryEntry.java
  
  Index: JDKRegistryEntry.java
  ===================================================================
  RCS file: /home/cvs/xml-batik/sources/org/apache/batik/ext/awt/image/spi/JDKRegistryEntry.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- JDKRegistryEntry.java	13 Feb 2003 13:11:37 -0000	1.6
  +++ JDKRegistryEntry.java	4 Mar 2003 22:52:15 -0000	1.7
  @@ -132,6 +132,8 @@
           MyImgObs observer = new MyImgObs();
           Toolkit.getDefaultToolkit().prepareImage(img, -1, -1, observer);
           observer.waitTilWidthHeightDone();
  +        if (observer.imageError)
  +            return null;
           int width  = observer.width;
           int height = observer.height;
           dr.setBounds(new Rectangle2D.Double(0, 0, width, height));
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-dev-help@xml.apache.org