summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/java/com/jogamp/gluegen/JavaEmitter.java15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/java/com/jogamp/gluegen/JavaEmitter.java b/src/java/com/jogamp/gluegen/JavaEmitter.java
index dea2249..636927d 100644
--- a/src/java/com/jogamp/gluegen/JavaEmitter.java
+++ b/src/java/com/jogamp/gluegen/JavaEmitter.java
@@ -1675,6 +1675,13 @@ public class JavaEmitter implements GlueEmitter {
final int[][] arrayLengthRes = new int[1][];
final boolean[] _useFixedArrayLen = { false };
elemCountExpr = getArrayArrayLengthExpr(fieldType.asArray(), fqStructFieldName, _useFixedArrayLen, arrayLengthRes);
+ if( null == elemCountExpr ) {
+ final String msg = "SKIP unsized array in struct: "+fqStructFieldName+": "+fieldType.getSignature(null).toString();
+ unit.emitln(" // "+msg);
+ unit.emitln();
+ LOG.log(WARNING, structCType.getASTLocusTag(), msg);
+ return;
+ }
// final int arrayLength = arrayLengthRes[0][0];
constElemCount = _useFixedArrayLen[0];
ownership = Ownership.Parent; // a fixed linear array
@@ -1732,14 +1739,6 @@ public class JavaEmitter implements GlueEmitter {
staticElemCount = _staticElemCount;
}
}
- if( null == elemCountExpr ) {
- final String msg = "SKIP unsized array in struct: "+fqStructFieldName+": "+fieldType.getSignature(null).toString();
- unit.emitln(" // "+msg);
- unit.emitln();
- LOG.log(WARNING, structCType.getASTLocusTag(), msg);
- throw new InternalError(msg);
- // return; // FIXME: Remove block unreachable
- }
boolean _maxOneElement = cfg.maxOneElement(fqStructFieldName);
if( !_maxOneElement ) {
try {