An update will be applied December 9th, between 12PM and 1:00PM EST (UTC -5:00). The site may be slow during that time.

Commit 26c8dc7b authored by Ken Martin's avatar Ken Martin
Browse files

minor checking

parent 416b288d
......@@ -54,7 +54,10 @@ vlFloatArray::vlFloatArray(const int sz, const int ext)
vlFloatArray::~vlFloatArray()
{
delete [] this->Array;
if (this->Array)
{
delete [] this->Array;
}
}
// Description:
......@@ -136,11 +139,15 @@ float *vlFloatArray::Resize(const int sz)
return 0;
}
memcpy(newArray, this->Array,
(sz < this->Size ? sz : this->Size) * sizeof(float));
if (this->Array)
{
memcpy(newArray, this->Array,
(sz < this->Size ? sz : this->Size) * sizeof(float));
delete [] this->Array;
}
this->Size = newSize;
delete [] this->Array;
this->Array = newArray;
return this->Array;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment