summaryrefslogtreecommitdiff
path: root/vcl/aqua/source/a11y
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2012-09-26 16:01:09 +0300
committerTor Lillqvist <tlillqvist@suse.com>2012-09-26 16:02:44 +0300
commit3376f682a77c16f4da63dc14c45d294425e5ba8a (patch)
tree73ee14d653709142a2ab95ce0d6241e8eb716c92 /vcl/aqua/source/a11y
parent171e4298422f91c47d6ce71599e86376083ea3aa (diff)
Silly workaround for fdo#55156
I feel dirty now. Change-Id: I1cafb0c0494d56bc9c81594c2145b2cc4a1ee389
Diffstat (limited to 'vcl/aqua/source/a11y')
-rw-r--r--vcl/aqua/source/a11y/aqua11ywrapper.mm4
1 files changed, 4 insertions, 0 deletions
diff --git a/vcl/aqua/source/a11y/aqua11ywrapper.mm b/vcl/aqua/source/a11y/aqua11ywrapper.mm
index 8acb5f41a73e..1491a04f5045 100644
--- a/vcl/aqua/source/a11y/aqua11ywrapper.mm
+++ b/vcl/aqua/source/a11y/aqua11ywrapper.mm
@@ -369,12 +369,16 @@ static BOOL isPopupMenuOpen = NO;
-(id)windowAttribute {
// go upstairs until reaching the broken connection
AquaA11yWrapper * aWrapper = self;
+ int loops = 0;
while ( [ aWrapper accessibleContext ] -> getAccessibleParent().is() ) {
AquaA11yWrapper *aTentativeParentWrapper = [ AquaA11yFactory wrapperForAccessibleContext: [ aWrapper accessibleContext ] -> getAccessibleParent() -> getAccessibleContext() ];
// Quick-and-dirty fix for infinite loop after fixing crash in
// fdo#47275
if ( aTentativeParentWrapper == aWrapper )
break;
+ // Even dirtier fix for infinite loop in fdo#55156
+ if ( loops++ == 100 )
+ break;
aWrapper = aTentativeParentWrapper;
[ aWrapper autorelease ];
}