- restored some code in PClass::CreateDerivedClass that accidentally got removed.

This commit is contained in:
Christoph Oelckers 2017-02-23 19:03:31 +01:00
parent 4bae6e81db
commit 65c4653f59

View file

@ -3219,8 +3219,10 @@ PClass *PClass::CreateDerivedClass(FName name, unsigned int size)
const PClass *existclass = FindClass(name);
if (existclass != nullptr)
{
// This is a placeholder so fill it in
if (existclass != NULL && existclass->Size == (unsigned)-1)
if (existclass->Size == TentativeClass)
{
type = const_cast<PClass*>(existclass);
if (!IsDescendantOf(type->ParentClass))
@ -3231,6 +3233,12 @@ PClass *PClass::CreateDerivedClass(FName name, unsigned int size)
notnew = true;
}
else
{
// a different class with the same name already exists. Let the calling code deal with this.
return nullptr;
}
}
else
{
type = static_cast<PClass *>(GetClass()->CreateNew());
notnew = false;