From b08910aacc42f86e2931c2a05b135c28192e1c3b Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Tue, 7 Jun 2022 18:59:25 +0800 Subject: [PATCH] :bug: Fix npe --- kernel/util/rhy.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/util/rhy.go b/kernel/util/rhy.go index a469411e0..1c29aad40 100644 --- a/kernel/util/rhy.go +++ b/kernel/util/rhy.go @@ -33,7 +33,7 @@ func GetRhyResult(force bool, proxyURL string) (map[string]interface{}, error) { defer rhyResultLock.Unlock() now := time.Now().Unix() - if 3600 >= now-rhyResultCacheTime && !force { + if 3600 >= now-rhyResultCacheTime && !force && 0 < len(cachedRhyResult) { return cachedRhyResult, nil }