diff --git a/src/context.cpp b/src/context.cpp index ae5d5bc220d..551db1ad6dd 100644 --- a/src/context.cpp +++ b/src/context.cpp @@ -5244,7 +5244,7 @@ class NestingNodeContext::Private : public PropertyMapper void addClasses(bool inherit, bool hideSuper) { ClassDef *cd = m_def->definitionType()==Definition::TypeClass ? (ClassDef*)m_def : 0; - if (inherit) + if (cd && inherit) { bool hasChildren = !cd->visited && !hideSuper && classHasVisibleChildren(cd); if (hasChildren)