aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/javassist/CtClass.java
diff options
context:
space:
mode:
authorBurak Şahin <abrkshn95@gmail.com>2021-09-21 11:13:48 +0300
committerBurak Şahin <abrkshn95@gmail.com>2021-09-21 11:13:48 +0300
commit018169818c4ed96d3095f52c588b439510c1b288 (patch)
treebd150ee8217d1a822fdc4a202af048523bdf2ea8 /src/main/javassist/CtClass.java
parent047f7c71be30d1fce5773c8e9c014052acac14df (diff)
downloadjavassist-018169818c4ed96d3095f52c588b439510c1b288.tar.gz
javassist-018169818c4ed96d3095f52c588b439510c1b288.zip
Fix for NullPointerException on detach()
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);
}