diff --git a/src/com/redstoner/coremods/moduleLoader/ModuleLoader.java b/src/com/redstoner/coremods/moduleLoader/ModuleLoader.java index 4503332..d7cf640 100644 --- a/src/com/redstoner/coremods/moduleLoader/ModuleLoader.java +++ b/src/com/redstoner/coremods/moduleLoader/ModuleLoader.java @@ -324,11 +324,16 @@ public final class ModuleLoader implements CoreModule CommandManager.unregisterAll(commands); try { - loaders.get(module).close(); + URLClassLoader loader = loaders.get(module); + if (loader != null) + loader.close(); } catch (IOException e) {} - loaders.remove(module); + finally + { + loaders.remove(module); + } } }