diff options
Diffstat (limited to 'contrib/llvm/tools/lldb/source/Symbol/Variable.cpp')
-rw-r--r-- | contrib/llvm/tools/lldb/source/Symbol/Variable.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/contrib/llvm/tools/lldb/source/Symbol/Variable.cpp b/contrib/llvm/tools/lldb/source/Symbol/Variable.cpp index 7276e0a..36fe3b1 100644 --- a/contrib/llvm/tools/lldb/source/Symbol/Variable.cpp +++ b/contrib/llvm/tools/lldb/source/Symbol/Variable.cpp @@ -832,10 +832,17 @@ PrivateAutoComplete (StackFrame *frame, VariableList *variable_list = frame->GetVariableList(get_file_globals); + if (!variable_list) + break; + const size_t num_variables = variable_list->GetSize(); for (size_t i=0; i<num_variables; ++i) { Variable *variable = variable_list->GetVariableAtIndex(i).get(); + + if (!variable) + continue; + const char *variable_name = variable->GetName().AsCString(); if (strstr(variable_name, token.c_str()) == variable_name) { |