Ensure initialize fransform data 43/296543/1
authorEunki, Hong <eunkiki.hong@samsung.com>
Tue, 1 Aug 2023 01:01:02 +0000 (10:01 +0900)
committerEunki, Hong <eunkiki.hong@samsung.com>
Tue, 1 Aug 2023 01:01:02 +0000 (10:01 +0900)
We got some strange bugs that TransformManagerData::mManager is nullptr
and TransformManagerData::mId is not INVALID_TRANSFORM_ID.

If it is possible, we must mallocate SG::Node without constructor.
But it is impossible case.

But anyway, to ensure that we call constructor of TransformManagerData,
just initialize it on Node constructor timing

Change-Id: I6905799167381b228a054a9e53e1a8250ed90b8a
Signed-off-by: Eunki, Hong <eunkiki.hong@samsung.com>
dali/internal/update/nodes/node.cpp

index 91e3a0a..55447df 100644 (file)
@@ -82,7 +82,8 @@ void Node::Delete(Node* node)
 }
 
 Node::Node()
-: mOrientation(),                                                               // Initialized to identity by default
+: mTransformManagerData(),                                                      // Initialized to use invalid id by default
+  mOrientation(),                                                               // Initialized to identity by default
   mWorldPosition(TRANSFORM_PROPERTY_WORLD_POSITION, Vector3(0.0f, 0.0f, 0.0f)), // Zero initialized by default
   mWorldScale(TRANSFORM_PROPERTY_WORLD_SCALE, Vector3(1.0f, 1.0f, 1.0f)),
   mWorldOrientation(), // Initialized to identity by default