Merge pull request #20 from JJL772/pr-fix-possible-nullptr-deref

Fix possible NULL deref in NTNDArray::getValueSize()
This commit is contained in:
Andrew Johnson
2025-04-04 09:53:04 -05:00
committed by GitHub

View File

@ -327,10 +327,8 @@ int64 NTNDArray::getValueSize()
{
int64 size = 0;
PVScalarArrayPtr storedValue = getValue()->get<PVScalarArray>();
if (!storedValue.get())
{
if (storedValue.get())
size = storedValue->getLength()*getValueTypeSize();
}
return size;
}