Fixed illegal pointer use
This commit is contained in:
parent
078f96f805
commit
06d8b24ab5
3 changed files with 9 additions and 9 deletions
|
@ -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());
|
||||
}
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
|
|
Reference in a new issue