From 95cbd7c1b3cdbe81fdee1682049bd08ab7fe99fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20L=C3=BCbking?= Date: Sun, 17 Jan 2016 22:39:36 +0100 Subject: [PATCH] prevent nullptr dereferentiation BUG: 357032 FIXED-IN: 5.6 REVIEW: 126787 --- scene.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scene.cpp b/scene.cpp index e6738530b0..ad5ca6d929 100644 --- a/scene.cpp +++ b/scene.cpp @@ -825,9 +825,8 @@ WindowQuadList Scene::Window::buildQuads(bool force) const AbstractClient *client = dynamic_cast(toplevel); QRegion contents = clientShape(); QRegion center = toplevel->transparentRect(); - QRegion decoration = (client && true ? - QRegion(client->decorationRect()) : shape()) - center; - ret = makeQuads(WindowQuadContents, contents, client->clientContentPos()); + QRegion decoration = (client ? QRegion(client->decorationRect()) : shape()) - center; + ret = makeQuads(WindowQuadContents, contents, toplevel->clientContentPos()); QRect rects[4]; bool isShadedClient = false;