Fixed illegal pointer use

This commit is contained in:
Hrvoje Jasak 2015-08-07 12:08:17 +01:00 committed by Dominik Christ
parent 078f96f805
commit 06d8b24ab5
3 changed files with 9 additions and 9 deletions

View file

@ -91,12 +91,12 @@ void Foam::MeshedSurfaceIOAllocator::resetFaces
const Xfer<surfZoneList>& zones
)
{
if (&faces)
if (!faces().empty())
{
faces_.transfer(faces());
}
if (&zones)
if (!zones().empty())
{
zones_.transfer(zones());
}
@ -112,7 +112,7 @@ void Foam::MeshedSurfaceIOAllocator::reset
{
// Take over new primitive data.
// Optimized to avoid overwriting data at all
if (&points)
if (!points().empty())
{
points_.transfer(points());
}
@ -130,7 +130,7 @@ void Foam::MeshedSurfaceIOAllocator::reset
{
// Take over new primitive data.
// Optimized to avoid overwriting data at all
if (&points)
if (!points().empty())
{
points_.transfer(points());
}

View file

@ -207,7 +207,7 @@ Foam::surfMesh::surfMesh
}
// We can also send Xfer<..>::null just to initialize without allocating
if (&surf)
if (!surf().empty())
{
transfer(surf());
}