1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 22:52:11 +02:00

Fix 137463 NPE in addName when the name.toCharArray() was null for anonymous declarations.

This commit is contained in:
Doug Schaefer 2006-04-19 15:41:46 +00:00
parent f69a491f4d
commit 093466adab

View file

@ -97,8 +97,12 @@ public class PDOMCPPLinkage extends PDOMLinkage {
}
public PDOMBinding addName(IASTName name) throws CoreException {
if (name == null || name.toCharArray().length == 0
|| name instanceof ICPPASTQualifiedName)
if (name == null || name instanceof ICPPASTQualifiedName)
return null;
// Check for null name
char[] namechars = name.toCharArray();
if (namechars == null || namechars.length == 0)
return null;
IBinding binding = name.resolveBinding();