<rdar://problem/14822563> - Do not attempt to use a null VariableList or crashes will ensue
llvm-svn: 197862
This commit is contained in:
parent
0c0f9dcd91
commit
16f35ea9bb
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue