Fix crasher from malformed program
This commit is contained in:
3
decl.cpp
3
decl.cpp
@@ -527,6 +527,9 @@ GetStructTypesNamesPositions(const std::vector<StructDeclaration *> &sd,
|
|||||||
std::set<std::string> seenNames;
|
std::set<std::string> seenNames;
|
||||||
for (unsigned int i = 0; i < sd.size(); ++i) {
|
for (unsigned int i = 0; i < sd.size(); ++i) {
|
||||||
const Type *type = sd[i]->type;
|
const Type *type = sd[i]->type;
|
||||||
|
if (type == NULL)
|
||||||
|
continue;
|
||||||
|
|
||||||
// FIXME: making this fake little DeclSpecs here is really
|
// FIXME: making this fake little DeclSpecs here is really
|
||||||
// disgusting
|
// disgusting
|
||||||
DeclSpecs ds(type);
|
DeclSpecs ds(type);
|
||||||
|
|||||||
Reference in New Issue
Block a user