From a2c2bb6987f97788c165126ba6e41c69e08d0aee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Wed, 21 Jul 2021 16:40:05 +0800 Subject: check nil --- script/core/searcher.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/script/core/searcher.lua b/script/core/searcher.lua index 852f7b2a..6554779f 100644 --- a/script/core/searcher.lua +++ b/script/core/searcher.lua @@ -856,6 +856,9 @@ function m.searchRefsByID(status, uri, expect, mode) end local function prepareSearch(source) + if not source then + return + end if source.type == 'field' or source.type == 'method' then source = source.parent -- cgit v1.2.3