Skip to content

Commit 4b3b252

Browse files
committed
added null check.
1 parent da55136 commit 4b3b252

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/swagger-codegen/src/main/java/io/swagger/codegen/DefaultCodegen.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3146,7 +3146,7 @@ private void addVars(CodegenModel m, List<CodegenProperty> vars, Map<String, Pro
31463146
m.hasEnums = true;
31473147
}
31483148

3149-
if (prop instanceof RefProperty) {
3149+
if (allDefinitions != null && prop instanceof RefProperty) {
31503150
RefProperty refProperty = (RefProperty) prop;
31513151
Model model = allDefinitions.get(refProperty.getSimpleRef());
31523152
if (model instanceof ModelImpl) {

0 commit comments

Comments
 (0)