From 5164c4b2f63af1f0ef644cc3b0a88acbecd4c86a Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Sun, 18 Feb 2018 19:06:40 -0800 Subject: [PATCH] Fix GetCallersForAllBaseFunctions found by romix --- src/query_utils.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/query_utils.cc b/src/query_utils.cc index 6a6b52fe..faf95cbb 100644 --- a/src/query_utils.cc +++ b/src/query_utils.cc @@ -274,10 +274,11 @@ std::vector GetCallersForAllBaseFunctions(QueryDatabase* db, queue.pop(); AddRange(&callers, func.uses); - if (def) - EachWithGen(db->funcs, def->base, [&](QueryFunc& func1) { + if (const QueryFunc::Def* def1 = func.AnyDef()) { + EachWithGen(db->funcs, def1->base, [&](QueryFunc& func1) { queue.push(&func1); }); + } } return callers;