summaryrefslogtreecommitdiffstats
path: root/tdeui/ksharedpixmap.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-12-11 12:47:50 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-12-11 12:47:50 -0600
commit1c14fecac3903921cef9e63e01deb4228bd4d51d (patch)
tree1ba9b9e28d1f8abd15dd45fd0d78a587dd5220ce /tdeui/ksharedpixmap.cpp
parentd77215db6fcbb6230c5cdbbfea0c907441af4d60 (diff)
downloadtdelibs-1c14fecac3903921cef9e63e01deb4228bd4d51d.tar.gz
tdelibs-1c14fecac3903921cef9e63e01deb4228bd4d51d.zip
Work around Bug 1161
Diffstat (limited to 'tdeui/ksharedpixmap.cpp')
-rw-r--r--tdeui/ksharedpixmap.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/tdeui/ksharedpixmap.cpp b/tdeui/ksharedpixmap.cpp
index 91babd672..6789e0a64 100644
--- a/tdeui/ksharedpixmap.cpp
+++ b/tdeui/ksharedpixmap.cpp
@@ -162,6 +162,13 @@ bool KSharedPixmap::x11Event(XEvent *event)
Status status = XGetGeometry(tqt_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;