Fix crasher from malformed program

This commit is contained in:
Matt Pharr
2011-11-30 10:32:03 -08:00
parent 7a2561c429
commit d4d6bc5d7f

View File

@@ -527,6 +527,9 @@ GetStructTypesNamesPositions(const std::vector<StructDeclaration *> &sd,
std::set<std::string> seenNames;
for (unsigned int i = 0; i < sd.size(); ++i) {
const Type *type = sd[i]->type;
if (type == NULL)
continue;
// FIXME: making this fake little DeclSpecs here is really
// disgusting
DeclSpecs ds(type);