1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-22 14:12:10 +02:00

307495 - fixed NPE

This commit is contained in:
Alena Laskavaia 2010-03-30 12:50:23 +00:00
parent d0592246c4
commit 077c8e6e45

View file

@ -62,7 +62,9 @@ public class NonVirtualDestructor extends AbstractIndexAstChecker {
if (destName != null) { if (destName != null) {
if (destName instanceof ICPPInternalBinding) { if (destName instanceof ICPPInternalBinding) {
ICPPInternalBinding bin = (ICPPInternalBinding) destName; ICPPInternalBinding bin = (ICPPInternalBinding) destName;
ast = bin.getDeclarations()[0]; IASTNode[] decls = bin.getDeclarations();
if (decls!=null && decls.length>0)
ast = decls[0];
} }
mess = MessageFormat mess = MessageFormat
.format( .format(