summaryrefslogtreecommitdiff
path: root/vcl/aqua/source/a11y/aqua11ywrapper.mm
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/aqua/source/a11y/aqua11ywrapper.mm')
-rw-r--r--vcl/aqua/source/a11y/aqua11ywrapper.mm11
1 files changed, 10 insertions, 1 deletions
diff --git a/vcl/aqua/source/a11y/aqua11ywrapper.mm b/vcl/aqua/source/a11y/aqua11ywrapper.mm
index 9f4e55e408a0..1be3e4ae5910 100644
--- a/vcl/aqua/source/a11y/aqua11ywrapper.mm
+++ b/vcl/aqua/source/a11y/aqua11ywrapper.mm
@@ -378,8 +378,17 @@ static BOOL isPopupMenuOpen = NO;
-(id)windowAttribute {
// go upstairs until reaching the broken connection
AquaA11yWrapper * aWrapper = self;
+ int loops = 0;
while ( [ aWrapper accessibleContext ] -> getAccessibleParent().is() ) {
- aWrapper = [ AquaA11yFactory wrapperForAccessibleContext: [ aWrapper accessibleContext ] -> getAccessibleParent() -> getAccessibleContext() ];
+ 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 ];
}
// get associated NSWindow