1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-05 16:56:04 +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$
}
StringBuilder buf= new StringBuilder();
buf.append(scope.getScopeName().toCharArray());
IName scopeName = scope.getScopeName();
if (scopeName != null) {
buf.append(scopeName.toCharArray());
}
scope= scope.getParent();
while (scope != null && scope != tuscope) {
buf.append(':');
buf.append(scope.getScopeName().toCharArray());
scopeName= scope.getScopeName();
if (scopeName != null) {
buf.append(scope.getScopeName().toCharArray());
}
scope= scope.getParent();
}
return buf.toString();