Fix NullPointerException for prototype folders with non-valid type names
This commit is contained in:
parent
f7e929441c
commit
0c4bb5b7d4
1 changed files with 4 additions and 3 deletions
|
@ -134,9 +134,10 @@ public final class TypeManager {
|
||||||
Prototype proto = getPrototype(name);
|
Prototype proto = getPrototype(name);
|
||||||
|
|
||||||
// if prototype doesn't exist, create it
|
// if prototype doesn't exist, create it
|
||||||
if ((proto == null) && isValidTypeName(name)) {
|
if (proto == null) {
|
||||||
// create new prototype
|
// create new prototype if type name is valid
|
||||||
createPrototype(name, (Repository) list[i]);
|
if (isValidTypeName(name))
|
||||||
|
createPrototype(name, (Repository) list[i]);
|
||||||
} else {
|
} else {
|
||||||
proto.addRepository((Repository) list[i]);
|
proto.addRepository((Repository) list[i]);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue