aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/javassist/CtClass.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/javassist/CtClass.java')
-rw-r--r--src/main/javassist/CtClass.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/javassist/CtClass.java b/src/main/javassist/CtClass.java
index f227019f..f1a47342 100644
--- a/src/main/javassist/CtClass.java
+++ b/src/main/javassist/CtClass.java
@@ -1423,7 +1423,7 @@ public abstract class CtClass {
public void detach() {
ClassPool cp = getClassPool();
CtClass obj = cp.removeCached(getName());
- if (obj != this)
+ if (obj != null && obj != this)
cp.cacheCtClass(getName(), obj, false);
}