diff --git a/module.cpp b/module.cpp index cc8e46f5..d3dd8d85 100644 --- a/module.cpp +++ b/module.cpp @@ -457,6 +457,10 @@ Module::AddGlobal(DeclSpecs *ds, Declarator *decl) { // declarations, typedefs, and global variables declarations / // definitions. Figure out what we've got and take care of it. + if (ds == NULL || decl == NULL) + // Error happened earlier during parsing + return; + if (decl->isFunction) { // function declaration const Type *t = decl->GetType(ds);