diff --git a/lldb/source/Expression/ClangExpressionDeclMap.cpp b/lldb/source/Expression/ClangExpressionDeclMap.cpp index d879f19985aa..08a507490fb0 100644 --- a/lldb/source/Expression/ClangExpressionDeclMap.cpp +++ b/lldb/source/Expression/ClangExpressionDeclMap.cpp @@ -2539,7 +2539,7 @@ ClangExpressionDeclMap::FindExternalVisibleDecls (NameSearchContext &context, return; } } - else if (target) + else if (frame && target) { var = FindGlobalVariable (*target, module_sp,