1
0
Fork 0
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:
fgenesis 2013-04-21 18:47:51 +02:00
parent 25262144f3
commit 0c768a711d

View file

@ -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;
}