Fix NPE in JavaClientCodegen when model has no properties of its own

A model that inherits from another model and does not add its own properties
causes JavaClientCodegen to crash silently with an NPE.

Fixes #1141
This commit is contained in:
Sean Bright
2015-09-17 14:33:21 -04:00
parent 27e434d786
commit e2ce427fb1

View File

@@ -1439,6 +1439,8 @@ public class DefaultCodegen {
}
} else {
m.emptyVars = true;
m.hasVars = false;
m.hasEnums = false;
}
}