Fix NullPointerException for prototype folders with non-valid type names

This commit is contained in:
hns 2005-03-15 10:43:15 +00:00
parent f7e929441c
commit 0c4bb5b7d4

View file

@ -134,9 +134,10 @@ public final class TypeManager {
Prototype proto = getPrototype(name);
// if prototype doesn't exist, create it
if ((proto == null) && isValidTypeName(name)) {
// create new prototype
createPrototype(name, (Repository) list[i]);
if (proto == null) {
// create new prototype if type name is valid
if (isValidTypeName(name))
createPrototype(name, (Repository) list[i]);
} else {
proto.addRepository((Repository) list[i]);
}