From 8889f3c99cf97fb2c97ea27f286fa2f06cfde5c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=A7=E7=9F=B3=E5=A4=B4?= Date: Mon, 13 May 2019 22:45:54 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3RedisHash.TryGetValue?= =?UTF-8?q?=E7=A9=BA=E5=BC=95=E7=94=A8=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- NewLife.Redis/RedisHash.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);