From 5fb67414d2108445565bc406bda4c98c624ece44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Thu, 10 Sep 2015 10:38:54 +0200 Subject: [PATCH] [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 --- libkwineffects/kwineffects.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libkwineffects/kwineffects.cpp b/libkwineffects/kwineffects.cpp index 41f091f6f0..fe6a27be2e 100644 --- a/libkwineffects/kwineffects.cpp +++ b/libkwineffects/kwineffects.cpp @@ -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; }