Details
-
Bug
-
Resolution: Incomplete
-
P2: Important
-
None
-
5.7.0 Beta
Description
Crash at sphere.cpp, line 113 if points vector is empty.
This happens if I pass the parent entity to the entity constructor when creating a new object in an already visible scene. Then the entity is added to the scene immediately and the bounding volume calculation is done before the vertices are set.
auto *entity = new SomeEntity(parentEntity);
entity->setDataForEntity();
The problem can be avoided by setting the parent explicitly after the data is set, like this
auto *entity = new SomeEntity;
entity->setDataForEntity();
entity->setParent(parentEntity);