diff options
Diffstat (limited to 'src/antlr/com/jogamp/gluegen/cgram')
-rw-r--r-- | src/antlr/com/jogamp/gluegen/cgram/HeaderParser.g | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/antlr/com/jogamp/gluegen/cgram/HeaderParser.g b/src/antlr/com/jogamp/gluegen/cgram/HeaderParser.g index d159ff3..4bcb052 100644 --- a/src/antlr/com/jogamp/gluegen/cgram/HeaderParser.g +++ b/src/antlr/com/jogamp/gluegen/cgram/HeaderParser.g @@ -689,7 +689,12 @@ structDeclaration[CompoundType containingType] returns [boolean addedAny] { if (!addedAny) { if (t != null) { CompoundType ct = t.asCompound(); - if (ct.isUnion()) { + if( null == ct ) { + throwGlueGenException(structDeclaration_AST_in, + String.format("Anonymous compound, w/ NULL type:%n containing '%s'", + getTypeString(containingType))); + } + if ( ct.isUnion() ) { // Anonymous union containingType.addField(new Field(null, t, null)); } |