Fixed bug where objects without transform causes a crash on reparenting
This commit is contained in:
parent
605ff9710d
commit
03c0d10014
|
@ -263,6 +263,9 @@ namespace SHADE
|
||||||
auto* node = EVENT_DATA->data->node;
|
auto* node = EVENT_DATA->data->node;
|
||||||
auto* tf = SHComponentManager::GetComponent_s<SHTransformComponent>(node->GetEntityID());
|
auto* tf = SHComponentManager::GetComponent_s<SHTransformComponent>(node->GetEntityID());
|
||||||
|
|
||||||
|
if (tf == nullptr)
|
||||||
|
return EVENT_DATA->handle;
|
||||||
|
|
||||||
// Recompute local transform and store localToWorld Matrix
|
// Recompute local transform and store localToWorld Matrix
|
||||||
SHMatrix localToWorld = SHMatrix::Identity;
|
SHMatrix localToWorld = SHMatrix::Identity;
|
||||||
SHMatrix worldToLocal = SHMatrix::Identity;
|
SHMatrix worldToLocal = SHMatrix::Identity;
|
||||||
|
|
Loading…
Reference in New Issue