diff --git a/source/net/sourceforge/filebot/web/CachedResource.java b/source/net/sourceforge/filebot/web/CachedResource.java index e8674f59..d802beb1 100644 --- a/source/net/sourceforge/filebot/web/CachedResource.java +++ b/source/net/sourceforge/filebot/web/CachedResource.java @@ -78,14 +78,18 @@ public abstract class CachedResource { } } else { try { - product = type.cast(element.getValue()); + if (element != null) { + product = type.cast(element.getValue()); + } } catch (Exception e) { Logger.getLogger(getClass().getName()).log(Level.WARNING, e.getMessage()); } } try { - getCache().put(element); + if (element != null) { + getCache().put(element); + } } catch (Exception e) { Logger.getLogger(getClass().getName()).log(Level.WARNING, e.getMessage()); }