Commit e343b333 authored by Roberto Raggi's avatar Roberto Raggi
Browse files

Check for possible 0x0 accesses.

parent 75bcf2bc
......@@ -522,7 +522,7 @@ ClassOrNamespace *ClassOrNamespace::nestedType(const Name *name) const
if (const TemplateNameId *templId = name->asTemplateNameId()) {
foreach (ClassOrNamespace *i, c->_instantiations) {
if (templId->isEqualTo(i->_templateId))
if (i->_templateId && templId->isEqualTo(i->_templateId))
return i;
}
......
......@@ -170,6 +170,8 @@ const FullySpecifiedType &TemplateNameId::templateArgumentAt(unsigned index) con
bool TemplateNameId::isEqualTo(const Name *other) const
{
if (! other)
return false;
const TemplateNameId *t = other->asTemplateNameId();
if (! t)
return false;
......
Markdown is supported
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