aboutsummaryrefslogtreecommitdiff
path: root/PhysX_3.4/Source/GeomUtils/src/mesh/GuBV4.cpp
diff options
context:
space:
mode:
authorSheikh Dawood Abdul Ajees <[email protected]>2017-04-25 16:02:08 -0500
committerSheikh Dawood Abdul Ajees <[email protected]>2017-04-25 16:02:08 -0500
commitd11708e398c2f6377d9eac2b1f7248c62faab569 (patch)
tree5778e794690c046ab4b0205d8f764960a5af168b /PhysX_3.4/Source/GeomUtils/src/mesh/GuBV4.cpp
parentPhysX 3.4, APEX 1.4 patch release @21821222 (diff)
downloadphysx-3.4-d11708e398c2f6377d9eac2b1f7248c62faab569.tar.xz
physx-3.4-d11708e398c2f6377d9eac2b1f7248c62faab569.zip
PhysX 3.4, APEX 1.4 patch release @22017166
Diffstat (limited to 'PhysX_3.4/Source/GeomUtils/src/mesh/GuBV4.cpp')
-rw-r--r--PhysX_3.4/Source/GeomUtils/src/mesh/GuBV4.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/PhysX_3.4/Source/GeomUtils/src/mesh/GuBV4.cpp b/PhysX_3.4/Source/GeomUtils/src/mesh/GuBV4.cpp
index 7b54c5bd..a4e90824 100644
--- a/PhysX_3.4/Source/GeomUtils/src/mesh/GuBV4.cpp
+++ b/PhysX_3.4/Source/GeomUtils/src/mesh/GuBV4.cpp
@@ -188,14 +188,20 @@ BV4Tree::BV4Tree(const PxEMPTY)
void BV4Tree::exportExtraData(PxSerializationContext& stream)
{
- stream.alignData(16);
- stream.writeData(mNodes, mNbNodes*sizeof(BVDataPacked));
+ if(mNbNodes)
+ {
+ stream.alignData(16);
+ stream.writeData(mNodes, mNbNodes*sizeof(BVDataPacked));
+ }
}
void BV4Tree::importExtraData(PxDeserializationContext& context)
{
- context.alignExtraData(16);
- mNodes = context.readExtraData<BVDataPacked>(mNbNodes);
+ if(mNbNodes)
+ {
+ context.alignExtraData(16);
+ mNodes = context.readExtraData<BVDataPacked>(mNbNodes);
+ }
}
//~PX_SERIALIZATION