diff --git a/source/net/yacy/document/ImageParser.java b/source/net/yacy/document/ImageParser.java index 69c25e576..ef1fd3580 100644 --- a/source/net/yacy/document/ImageParser.java +++ b/source/net/yacy/document/ImageParser.java @@ -69,7 +69,16 @@ public class ImageParser { final int handle = image.hashCode(); mediaTracker.addImage(image, handle); - try {mediaTracker.waitForID(handle);} catch (final InterruptedException e) {} + try { + mediaTracker.waitForID(handle); + + if (mediaTracker.isErrorID(handle)) { // true if status ERRORD during loading (happens on not supported formats too) + mediaTracker.removeImage(image, handle); + image = null; // return null to indicate source not handled + } + } catch (final InterruptedException e) { + return null; + } return image; }