< prev index next >

src/java.desktop/share/classes/sun/awt/image/OffScreenImageSource.java

Print this page

        

*** 185,205 **** theConsumer.setDimensions(image.getWidth(), image.getHeight()); theConsumer.setProperties(properties); sendPixels(); theConsumer.imageComplete(ImageConsumer.SINGLEFRAMEDONE); try { theConsumer.imageComplete(ImageConsumer.STATICIMAGEDONE); } catch (RuntimeException e) { // We did not previously call this method here and // some image consumer filters were not prepared for it to be // called at this time. We allow them to have runtime issues // for this one call only without triggering the IMAGEERROR // condition below. e.printStackTrace(); } ! } catch (NullPointerException e) { e.printStackTrace(); if (theConsumer != null) { theConsumer.imageComplete(ImageConsumer.IMAGEERROR); --- 185,207 ---- theConsumer.setDimensions(image.getWidth(), image.getHeight()); theConsumer.setProperties(properties); sendPixels(); theConsumer.imageComplete(ImageConsumer.SINGLEFRAMEDONE); + // If 'theconsumer' has not unregistered itself after previous call + if (theConsumer != null) { try { theConsumer.imageComplete(ImageConsumer.STATICIMAGEDONE); } catch (RuntimeException e) { // We did not previously call this method here and // some image consumer filters were not prepared for it to be // called at this time. We allow them to have runtime issues // for this one call only without triggering the IMAGEERROR // condition below. e.printStackTrace(); } ! } } catch (NullPointerException e) { e.printStackTrace(); if (theConsumer != null) { theConsumer.imageComplete(ImageConsumer.IMAGEERROR);
< prev index next >