mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-29 03:45:35 +02:00
Fixes a NPE, bug 218389.
This commit is contained in:
parent
9d578b5f13
commit
e18a689410
1 changed files with 6 additions and 1 deletions
|
@ -109,6 +109,7 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPFunctionTemplate;
|
||||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPFunctionType;
|
import org.eclipse.cdt.core.dom.ast.cpp.ICPPFunctionType;
|
||||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPMember;
|
import org.eclipse.cdt.core.dom.ast.cpp.ICPPMember;
|
||||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPMethod;
|
import org.eclipse.cdt.core.dom.ast.cpp.ICPPMethod;
|
||||||
|
import org.eclipse.cdt.core.dom.ast.cpp.ICPPNamespace;
|
||||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPNamespaceScope;
|
import org.eclipse.cdt.core.dom.ast.cpp.ICPPNamespaceScope;
|
||||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPParameter;
|
import org.eclipse.cdt.core.dom.ast.cpp.ICPPParameter;
|
||||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPPointerToMemberType;
|
import org.eclipse.cdt.core.dom.ast.cpp.ICPPPointerToMemberType;
|
||||||
|
@ -1389,7 +1390,11 @@ public class CPPSemantics {
|
||||||
*/
|
*/
|
||||||
static private void storeUsingDirective(CPPSemantics.LookupData data, ICPPNamespaceScope container,
|
static private void storeUsingDirective(CPPSemantics.LookupData data, ICPPNamespaceScope container,
|
||||||
ICPPUsingDirective directive, Set<ICPPNamespaceScope> handled) throws DOMException {
|
ICPPUsingDirective directive, Set<ICPPNamespaceScope> handled) throws DOMException {
|
||||||
final ICPPNamespaceScope nominated= directive.getNamespace().getNamespaceScope();
|
final ICPPNamespace nsBinding = directive.getNamespace();
|
||||||
|
if (nsBinding == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
final ICPPNamespaceScope nominated= nsBinding.getNamespaceScope();
|
||||||
if (nominated == null || data.visited.containsKey(nominated) || (handled != null && !handled.add(nominated))) {
|
if (nominated == null || data.visited.containsKey(nominated) || (handled != null && !handled.add(nominated))) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue