diff options
author | Adam Domurad <[email protected]> | 2013-06-28 09:45:11 -0400 |
---|---|---|
committer | Adam Domurad <[email protected]> | 2013-06-28 09:45:11 -0400 |
commit | 871e40074835623e8c3bd5d5d94227834956b077 (patch) | |
tree | 094c6672ebd015b089e0bbdf0f730ab82b1dce10 /plugin | |
parent | e50eab91bdff5ccdf194187834d7d4c520769189 (diff) |
Fix potential NPE on GetValue message
Diffstat (limited to 'plugin')
-rw-r--r-- | plugin/icedteanp/java/sun/applet/PluginAppletSecurityContext.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/plugin/icedteanp/java/sun/applet/PluginAppletSecurityContext.java b/plugin/icedteanp/java/sun/applet/PluginAppletSecurityContext.java index 697833d..cef0ac9 100644 --- a/plugin/icedteanp/java/sun/applet/PluginAppletSecurityContext.java +++ b/plugin/icedteanp/java/sun/applet/PluginAppletSecurityContext.java @@ -522,8 +522,9 @@ public class PluginAppletSecurityContext { Integer index = parseCall(args[1], null, Integer.class); Object ret = store.getObject(index); + Class<?> retClass = ret != null ? ret.getClass() : null; - String objIDStr = toObjectIDString(ret, ret.getClass(), true /*unbox primitives*/); + String objIDStr = toObjectIDString(ret, retClass, true /*unbox primitives*/); write(reference, "GetValue " + objIDStr); } else if (message.startsWith("SetStaticField") || message.startsWith("SetField")) { |