diff options
author | Deepak Bhole <[email protected]> | 2010-11-01 11:41:59 -0700 |
---|---|---|
committer | Deepak Bhole <[email protected]> | 2010-11-01 11:41:59 -0700 |
commit | 11e8be3c480413ecd7f4007e3726e5ce586ed696 (patch) | |
tree | d1d8ceb658a72a1e87289200548ba98d59f834ea /netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java | |
parent | a047731f1690b78412038abf8aef089e9fc6ace8 (diff) |
Fixed PR542
Plugin fails with NPE on http://www.openprocessing.org/visuals/iframe.php?visualID=2615
Diffstat (limited to 'netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java')
-rw-r--r-- | netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java b/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java index 0960c1a..104bf09 100644 --- a/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java +++ b/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java @@ -462,7 +462,14 @@ public class JNLPClassLoader extends URLClassLoader { for (JARDesc jarDesc: file.getResources().getJARs()) { try { - URL location = tracker.getCacheFile(jarDesc.getLocation()).toURL(); + File cachedFile = tracker.getCacheFile(jarDesc.getLocation()); + + if (cachedFile == null) { + System.err.println("JAR " + jarDesc.getLocation() + " not found. Continuing."); + continue; // JAR not found. Keep going. + } + + URL location = cachedFile.toURL(); SecurityDesc jarSecurity = file.getSecurity(); if (file instanceof PluginBridge) { |