catch NULL client pointer

BUG: 320589
FIXED-IN: 4.11
REVIEW: 110782
icc-effect-5.14.5
Thomas Lübking 2013-06-02 16:53:56 +02:00
parent 3a3579d6d4
commit 6f5f999c54
1 changed files with 10 additions and 5 deletions

View File

@ -748,15 +748,20 @@ WindowQuadList Scene::Window::buildQuads(bool force) const
ret = makeQuads(WindowQuadContents, contents);
QRect rects[4];
client->layoutDecorationRects(rects[0], rects[1], rects[2], rects[3], Client::WindowRelative);
bool isShadedClient = false;
if (!client || !(center.isEmpty() || client->isShade()))
ret += makeDecorationQuads(rects, decoration);
else {
// this is a shaded client, we have to create four decoration quads
if (client) {
client->layoutDecorationRects(rects[0], rects[1], rects[2], rects[3], Client::WindowRelative);
isShadedClient = client->isShade() || center.isEmpty();
}
if (isShadedClient) {
const QRect bounding = rects[0] | rects[1] | rects[2] | rects[3];
ret += makeDecorationQuads(rects, bounding);
} else {
ret += makeDecorationQuads(rects, decoration);
}
}
if (m_shadow) {
ret << m_shadow->shadowQuads();