Fix a warning if loading wrong version / etc.

This commit is contained in:
Unknown W. Brackets 2012-12-26 22:50:45 -08:00
parent 595759ef78
commit d6d3688c8c

View File

@ -336,6 +336,10 @@ void KernelObjectPool::DoState(PointerWrap &p)
{
p.Do(type);
pool[i] = CreateByIDType(type);
// Already logged an error.
if (pool[i] == NULL)
return;
}
else
{
@ -387,6 +391,7 @@ KernelObject *KernelObjectPool::CreateByIDType(int type)
default:
ERROR_LOG(COMMON, "Unable to load state: could not find object type %d.", type);
return NULL;
}
}