mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-08-09 16:14:40 +00:00
Fixes NPE with the cached state.
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user