mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-07 01:36:01 +02:00
Bug 513597 - NPE in DestructorCollector.addDestructorCall()
Change-Id: Ibf971013d1f9e65405a31a1f48c2e4c99731a381
This commit is contained in:
parent
468289a3da
commit
c8b23ec2d7
1 changed files with 3 additions and 1 deletions
|
@ -185,7 +185,9 @@ public class DestructorCallCollector {
|
||||||
IType type = SemanticUtil.getNestedType(var.getType(), TDEF | CVTYPE);
|
IType type = SemanticUtil.getNestedType(var.getType(), TDEF | CVTYPE);
|
||||||
if (type instanceof ICPPClassType) {
|
if (type instanceof ICPPClassType) {
|
||||||
ICPPMethod destructor = findDestructor((ICPPClassType) type, name);
|
ICPPMethod destructor = findDestructor((ICPPClassType) type, name);
|
||||||
addDestructorCall(name, destructor);
|
if (destructor != null) {
|
||||||
|
addDestructorCall(name, destructor);
|
||||||
|
}
|
||||||
} else if (type instanceof ICPPReferenceType) {
|
} else if (type instanceof ICPPReferenceType) {
|
||||||
IASTDeclarator decl = (IASTDeclarator) name.getParent();
|
IASTDeclarator decl = (IASTDeclarator) name.getParent();
|
||||||
addDestructorCallForTemporaryBoundToReference(decl);
|
addDestructorCallForTemporaryBoundToReference(decl);
|
||||||
|
|
Loading…
Add table
Reference in a new issue