summaryrefslogtreecommitdiff
path: root/kde
diff options
context:
space:
mode:
authorDanny Baumann <dannybaumann@web.de>2009-09-14 17:15:43 +0200
committerDanny Baumann <dannybaumann@web.de>2009-09-14 17:36:35 +0200
commit6f24079b8719327c112fd031e16f2bf7ec41fa42 (patch)
treeaaab390bc121e70089cbc933cb3554007abb3c1f /kde
parentd5c476cc62482e32fdb314d8d063a9d9de096ec4 (diff)
downloadzcomp-6f24079b8719327c112fd031e16f2bf7ec41fa42.tar.gz
zcomp-6f24079b8719327c112fd031e16f2bf7ec41fa42.tar.bz2
Check returned geometry for validity prior to using it.
Diffstat (limited to 'kde')
-rw-r--r--kde/window-decorator-kde4/window.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/kde/window-decorator-kde4/window.cpp b/kde/window-decorator-kde4/window.cpp
index d75a067..c0550be 100644
--- a/kde/window-decorator-kde4/window.cpp
+++ b/kde/window-decorator-kde4/window.cpp
@@ -1192,7 +1192,13 @@ KWD::Window::updateSelected (WId selectedId)
void
KWD::Window::updateWindowGeometry (void)
{
+ KWD::trapXError ();
KWindowInfo wInfo = KWindowSystem::windowInfo (mClientId, NET::WMGeometry);
+ KWD::popXError ();
+
+ if (!wInfo.valid ())
+ return;
+
QRect geometry = wInfo.geometry ();
int w, h;