Fix errors reported by valgind
fix mismtch new[]/delete[] fix acces to deleted object. svn path=/trunk/KDE/kdebase/workspace/; revision=810487
This commit is contained in:
parent
ed2d087f9b
commit
6606fbc98e
1 changed files with 9 additions and 9 deletions
|
@ -621,14 +621,14 @@ void WobblyWindowsEffect::initWobblyInfo(WindowWobblyInfos& wwi, QRect geometry)
|
|||
|
||||
void WobblyWindowsEffect::freeWobblyInfo(WindowWobblyInfos& wwi) const
|
||||
{
|
||||
delete wwi.origin;
|
||||
delete wwi.position;
|
||||
delete wwi.velocity;
|
||||
delete wwi.acceleration;
|
||||
delete wwi.buffer;
|
||||
delete wwi.constraint;
|
||||
delete[] wwi.origin;
|
||||
delete[] wwi.position;
|
||||
delete[] wwi.velocity;
|
||||
delete[] wwi.acceleration;
|
||||
delete[] wwi.buffer;
|
||||
delete[] wwi.constraint;
|
||||
|
||||
delete wwi.bezierSurface;
|
||||
delete[] wwi.bezierSurface;
|
||||
}
|
||||
|
||||
WobblyWindowsEffect::Pair WobblyWindowsEffect::computeBezierPoint(const WindowWobblyInfos& wwi, Pair point) const
|
||||
|
@ -1175,12 +1175,12 @@ bool WobblyWindowsEffect::updateWindowWobblyDatas(EffectWindow* w, qreal time)
|
|||
|
||||
if (wwi.status != Moving && acc_sum < m_stopAcceleration && vel_sum < m_stopVelocity)
|
||||
{
|
||||
freeWobblyInfo(wwi);
|
||||
windows.remove(w);
|
||||
if (wwi.status == Closing)
|
||||
{
|
||||
w->unrefWindow();
|
||||
}
|
||||
freeWobblyInfo(wwi);
|
||||
windows.remove(w);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue