ECS::makeEntity calls addComponentInternal within a loop to add components. If one of the components is not of a valid type, the newly created entity is deleted and the function returns NULL_ENTITY_HANDLE. However any components created before the invalid component was encountered are not removed.