mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-03-26 17:52:29 +01:00
Fixes NPE with the cached state.
This commit is contained in:
parent
37fdb8b2aa
commit
0182011487
@ -53,7 +53,9 @@ abstract class GenericBaseCache<K, V>(capacity: Int) : CachedState<K, V> {
|
||||
|
||||
val v = compute(k)
|
||||
|
||||
cache.put(k, v)
|
||||
if (v != null) {
|
||||
cache.put(k, v)
|
||||
}
|
||||
|
||||
return v
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user