修正RedisHash.TryGetValue空引用异常

This commit is contained in:
大石头 2019-05-13 22:45:54 +08:00
parent 895c361eba
commit 8889f3c99c
1 changed files with 1 additions and 1 deletions

View File

@ -63,7 +63,7 @@ namespace NewLife.Caching
value = default(TValue);
var pk = Execute(r => r.Execute<Packet>("HGET", Key, key));
if (pk.Total == 0) return false;
if (pk == null || pk.Total == 0) return false;
value = FromBytes<TValue>(pk);