1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-07 17:56:01 +02:00

Fixes a NPE, bug 230871.

This commit is contained in:
Markus Schorn 2008-05-21 14:29:24 +00:00
parent 1b27065ccd
commit 99bc710df4

View file

@ -176,11 +176,17 @@ public class CPPScopeMapper {
return ""; //$NON-NLS-1$ return ""; //$NON-NLS-1$
} }
StringBuilder buf= new StringBuilder(); StringBuilder buf= new StringBuilder();
buf.append(scope.getScopeName().toCharArray()); IName scopeName = scope.getScopeName();
if (scopeName != null) {
buf.append(scopeName.toCharArray());
}
scope= scope.getParent(); scope= scope.getParent();
while (scope != null && scope != tuscope) { while (scope != null && scope != tuscope) {
buf.append(':'); buf.append(':');
scopeName= scope.getScopeName();
if (scopeName != null) {
buf.append(scope.getScopeName().toCharArray()); buf.append(scope.getScopeName().toCharArray());
}
scope= scope.getParent(); scope= scope.getParent();
} }
return buf.toString(); return buf.toString();