[libkwineffects] Proper no-size check in WindowQuadList::splitAt(X|Y)

A quad might have a null size in case it has a null width or null height.
Not just one dimension.

BUG: 236353
BUG: 210467
FIXED-IN: 5.4.2
REVIEW: 125131
This commit is contained in:
Martin Gräßlin 2015-09-10 10:38:54 +02:00
parent 0b95561193
commit 5fb67414d2

View file

@ -1008,7 +1008,7 @@ WindowQuadList WindowQuadList::splitAtX(double x) const
ret.append(quad);
continue;
}
if (quad.left() == quad.right()) { // quad has no size
if (quad.top() == quad.bottom() || quad.left() == quad.right()) { // quad has no size
ret.append(quad);
continue;
}
@ -1040,7 +1040,7 @@ WindowQuadList WindowQuadList::splitAtY(double y) const
ret.append(quad);
continue;
}
if (quad.top() == quad.bottom()) { // quad has no size
if (quad.top() == quad.bottom() || quad.left() == quad.right()) { // quad has no size
ret.append(quad);
continue;
}