summaryrefslogtreecommitdiffstats
path: root/kdeui/ksharedpixmap.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-12-11 12:47:50 -0600
committerSlávek Banko <slavek.banko@axis.cz>2012-12-12 01:25:33 +0100
commit5359dcf36f4ab496b5c7fd724bbe37fba3672f37 (patch)
tree0f003956f6a0026c44c68045714827d776d4bd12 /kdeui/ksharedpixmap.cpp
parent7e2b38bcdd4797ce66da05b92d40a402b6dd4ee2 (diff)
downloadtdelibs-5359dcf36f4ab496b5c7fd724bbe37fba3672f37.tar.gz
tdelibs-5359dcf36f4ab496b5c7fd724bbe37fba3672f37.zip
Work around Bug 1161
(cherry picked from commit 1c14fecac3903921cef9e63e01deb4228bd4d51d)
Diffstat (limited to 'kdeui/ksharedpixmap.cpp')
-rw-r--r--kdeui/ksharedpixmap.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/kdeui/ksharedpixmap.cpp b/kdeui/ksharedpixmap.cpp
index 29c670265..9cd98fd8a 100644
--- a/kdeui/ksharedpixmap.cpp
+++ b/kdeui/ksharedpixmap.cpp
@@ -162,6 +162,13 @@ bool KSharedPixmap::x11Event(XEvent *event)
Status status = XGetGeometry(qt_xdisplay(), pixmap, &root, &dummy, &dummy, &width, &height, &udummy, &udummy);
+ // HACK
+ // XGetGeometry can return bogus values on some systems, leading to a SIGFPE
+ // See http://bugs.trinitydesktop.org/show_bug.cgi?id=1161 for details
+ // Work around that here...
+ if ((width < 1) || (height < 1))
+ return false;
+
if (status == BadDrawable)
return false;