Fixed KNPE when inline functions/constants are completely removed.
This commit is contained in:
@@ -280,7 +280,12 @@ public class IncrementalCacheImpl(val baseDir: File): StorageOwner, IncrementalC
|
||||
if (oldMap == constantsMap) {
|
||||
return false
|
||||
}
|
||||
map.put(key, constantsMap)
|
||||
if (constantsMap != null) {
|
||||
map.put(key, constantsMap)
|
||||
}
|
||||
else {
|
||||
map.remove(key)
|
||||
}
|
||||
return true
|
||||
}
|
||||
}
|
||||
@@ -396,6 +401,9 @@ public class IncrementalCacheImpl(val baseDir: File): StorageOwner, IncrementalC
|
||||
if (inlineFunctionsMap != null) {
|
||||
map.put(key, inlineFunctionsMap)
|
||||
}
|
||||
else {
|
||||
map.remove(key)
|
||||
}
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user