1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-07 00:05:53 +02:00

Bug 277757 - Attempting to add include for C function in C++ code results in exception

This commit is contained in:
Anton Leherbauer 2009-05-29 07:43:40 +00:00
parent e38496644a
commit 5a79f77805

View file

@ -299,6 +299,9 @@ public class AddIncludeOnSelectionAction extends TextEditorAction {
*/
private void considerForInclusion(IIndexName definition, IIndexBinding binding,
IIndex index, Map<String, IncludeCandidate> candidates) throws CoreException {
if (definition == null) {
return;
}
IIndexFile file = definition.getFile();
// Consider the file for inclusion only if it is not a source file,
// or a source file that was already included by some other file.