diff options
author | Mitchell Stokes <mogurijin@gmail.com> | 2013-08-03 09:01:57 +0400 |
---|---|---|
committer | Mitchell Stokes <mogurijin@gmail.com> | 2013-08-03 09:01:57 +0400 |
commit | 411a49445f7184f5aebb3d845fc223285cf0552b (patch) | |
tree | 4d675381bbe7d8e85568deb1dc0061fb36019adb /source/gameengine | |
parent | e8ca7abb9a45a5f9ab88865de0c2b87b9705eeb9 (diff) |
BGE: Making sure m_left, m_right, m_parent, m_radius, and m_client_object are initialized in the SG_Tree constructors.
Diffstat (limited to 'source/gameengine')
-rw-r--r-- | source/gameengine/SceneGraph/SG_Tree.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/source/gameengine/SceneGraph/SG_Tree.cpp b/source/gameengine/SceneGraph/SG_Tree.cpp index 99f68ef625a..bef246533a6 100644 --- a/source/gameengine/SceneGraph/SG_Tree.cpp +++ b/source/gameengine/SceneGraph/SG_Tree.cpp @@ -37,13 +37,19 @@ #include "SG_Tree.h" #include "SG_Node.h" -SG_Tree::SG_Tree() +SG_Tree::SG_Tree() : + m_left(NULL), + m_right(NULL), + m_parent(NULL), + m_radius(0.0), + m_client_object(NULL) { } SG_Tree::SG_Tree(SG_Tree* left, SG_Tree* right) : m_left(left), m_right(right), + m_parent(NULL), m_client_object(NULL) { if (m_left) @@ -63,6 +69,7 @@ SG_Tree::SG_Tree(SG_Tree* left, SG_Tree* right) : SG_Tree::SG_Tree(SG_Node* client) : m_left(NULL), m_right(NULL), + m_parent(NULL), m_client_object(client) { m_bbox = SG_BBox(client->BBox(), client->GetWorldTransform()); |