mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2025-07-04 06:54:39 +00:00
Cause less memory stress in InterpolatedVector assignment
This commit is contained in:
parent
25262144f3
commit
0c768a711d
1 changed files with 9 additions and 2 deletions
|
@ -500,11 +500,18 @@ public:
|
||||||
x = vec.x;
|
x = vec.x;
|
||||||
y = vec.y;
|
y = vec.y;
|
||||||
z = vec.z;
|
z = vec.z;
|
||||||
delete data;
|
|
||||||
if (vec.data)
|
if (vec.data)
|
||||||
data = new InterpolatedVectorData(*vec.data);
|
{
|
||||||
|
if (data)
|
||||||
|
*data = *vec.data;
|
||||||
else
|
else
|
||||||
|
data = new InterpolatedVectorData(*vec.data);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
delete data;
|
||||||
data = NULL;
|
data = NULL;
|
||||||
|
}
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue