diff --git a/NewLife.Redis/RedisHash.cs b/NewLife.Redis/RedisHash.cs index dd9e443..e0c4159 100644 --- a/NewLife.Redis/RedisHash.cs +++ b/NewLife.Redis/RedisHash.cs @@ -63,7 +63,7 @@ namespace NewLife.Caching value = default(TValue); var pk = Execute(r => r.Execute("HGET", Key, key)); - if (pk.Total == 0) return false; + if (pk == null || pk.Total == 0) return false; value = FromBytes(pk);