Merge pull request #231 from weslem/master
Prevent segfaults on Goto* with unparseable files
This commit is contained in:
commit
36815d7ccc
@ -272,6 +272,9 @@ Location ClangCompleter::GetDeclarationLocation(
|
|||||||
filename,
|
filename,
|
||||||
unsaved_files,
|
unsaved_files,
|
||||||
flags );
|
flags );
|
||||||
|
if (!unit) {
|
||||||
|
return Location();
|
||||||
|
}
|
||||||
return unit->GetDeclarationLocation( line, column, unsaved_files );
|
return unit->GetDeclarationLocation( line, column, unsaved_files );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -286,6 +289,9 @@ Location ClangCompleter::GetDefinitionLocation(
|
|||||||
filename,
|
filename,
|
||||||
unsaved_files,
|
unsaved_files,
|
||||||
flags );
|
flags );
|
||||||
|
if (!unit) {
|
||||||
|
return Location();
|
||||||
|
}
|
||||||
return unit->GetDefinitionLocation( line, column, unsaved_files );
|
return unit->GetDefinitionLocation( line, column, unsaved_files );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user