mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2025-01-26 02:07:26 +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;
|
||||
y = vec.y;
|
||||
z = vec.z;
|
||||
delete data;
|
||||
if (vec.data)
|
||||
data = new InterpolatedVectorData(*vec.data);
|
||||
{
|
||||
if (data)
|
||||
*data = *vec.data;
|
||||
else
|
||||
data = new InterpolatedVectorData(*vec.data);
|
||||
}
|
||||
else
|
||||
{
|
||||
delete data;
|
||||
data = NULL;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue