diff --git a/lldb/packages/Python/lldbsuite/test/python_api/name_lookup/TestNameLookup.py b/lldb/packages/Python/lldbsuite/test/python_api/name_lookup/TestNameLookup.py index 024b157ab0dd..3d228069dc22 100644 --- a/lldb/packages/Python/lldbsuite/test/python_api/name_lookup/TestNameLookup.py +++ b/lldb/packages/Python/lldbsuite/test/python_api/name_lookup/TestNameLookup.py @@ -43,7 +43,7 @@ class TestNameLookup(TestBase): for i in range(num_symbols): symbol = exe_module.GetSymbolAtIndex(i); name = symbol.GetName() - if 'unique_function_name' in name: + if name and 'unique_function_name' in name: mangled = symbol.GetMangledName() if mangled: mangled_to_symbol[mangled] = symbol