From 871e40074835623e8c3bd5d5d94227834956b077 Mon Sep 17 00:00:00 2001 From: Adam Domurad Date: Fri, 28 Jun 2013 09:45:11 -0400 Subject: Fix potential NPE on GetValue message --- plugin/icedteanp/java/sun/applet/PluginAppletSecurityContext.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'plugin/icedteanp') 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")) { -- cgit v1.2.3