PVS: V595 The pointer was utilized before it was verified against nullptr

This commit is contained in:
wmayer
2019-02-17 20:55:52 +01:00
parent 1e343d339f
commit 2bb5797568
7 changed files with 34 additions and 34 deletions

View File

@@ -242,18 +242,19 @@ SbBool SoSFMeshObject::readValue(SoInput *in)
// This writes the value of a field to a file.
void SoSFMeshObject::writeValue(SoOutput *out) const
{
if (!out->isBinary()) {
SoOutputStream str(out);
MeshCore::MeshOutput(value->getKernel()).SaveMeshNode(str);
return;
}
if (!value) {
int32_t count = 0;
out->write(count);
out->write(count);
return;
}
if (!out->isBinary()) {
SoOutputStream str(out);
MeshCore::MeshOutput(value->getKernel()).SaveMeshNode(str);
return;
}
const MeshCore::MeshPointArray& rPoints = value->getKernel().GetPoints();
std::vector<float> verts;
verts.reserve(3*rPoints.size());