From f22a79981c9a1e805e6df889e18f8faecee852a2 Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Tue, 11 Oct 2011 04:41:34 +0100 Subject: [PATCH] Fixed NPE on unloading plugins By: Nathan Adams --- .../src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paper-api/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java b/paper-api/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java index 6ab27ecd20..50bbdd15be 100644 --- a/paper-api/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java +++ b/paper-api/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java @@ -242,7 +242,7 @@ public class JavaPluginLoader implements PluginLoader { public void removeClass(String name) { Class clazz = classes.remove(name); - if (ConfigurationSerializable.class.isAssignableFrom(clazz)) { + if ((clazz != null) && (ConfigurationSerializable.class.isAssignableFrom(clazz))) { Class serializable = (Class)clazz; ConfigurationSerialization.unregisterClass(serializable); }