Commit 5a246795 authored by Milian Wolff's avatar Milian Wolff
Browse files

Validate declaration before access

The PersistentSymbolTable stores IndexedDeclarations, we should
validate the validity of the Declaration before use - potentially
the declaration isn't valid anymore.
parent 05889f37
......@@ -327,7 +327,7 @@ void TemplateClassGenerator::addBaseClass(const QString& base)
//Search for all super classes
for (PersistentSymbolTable::Declarations::Iterator it = decl.iterator(); it; ++it) {
DeclarationPointer declaration = DeclarationPointer(it->declaration());
if (declaration->isForwardDeclaration()) {
if (!declaration || declaration->isForwardDeclaration()) {
continue;
}
......
......@@ -131,8 +131,7 @@ QVariant ArgumentTypeFilter::doFilter (const QVariant& input, const QVariant& /*
for(PersistentSymbolTable::Declarations::Iterator it = decl.iterator(); it; ++it)
{
auto declaration = it->declaration();
if(declaration->isForwardDeclaration())
{
if (!declaration || declaration->isForwardDeclaration()) {
continue;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment