summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2017-04-21 23:50:23 +0200
committerMichael Stahl <mstahl@redhat.com>2017-04-22 00:07:13 +0200
commitc99f72bebdce6d294eb47e070fa1397a98ba2087 (patch)
tree97e671601ece26e8a627c361cbf5fd591642f0b2
parent4d43f9e9dda5edeeb6e4b99487b5b6a1fae4bd56 (diff)
sw: fix a11y crash on double Dispose
When testing with the bugdoc for tdf#107126, it happend that upon applying a page style, SwAccessibleContext::Dispose() was called twice, and that's not supposed to happen (and crashes, too, at least inside an assertion). There was an Action that queued up a bunch of events, but the Action did not complete formatting the document, so right after that during Paint more formatting happened and then the FireEvents() called Dispose() and InvalidatePosOrSize() called it again. Guess we shouldn't generate events for objects that we know are disposed due to not being visible. Change-Id: I5a0f04c0f32ee5e949b552f7a373c10ceee5c279
-rw-r--r--sw/source/core/access/accmap.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx
index 0e3d01b66f45..bf530abb7349 100644
--- a/sw/source/core/access/accmap.cxx
+++ b/sw/source/core/access/accmap.cxx
@@ -2390,7 +2390,10 @@ void SwAccessibleMap::InvalidatePosOrSize( const SwFrame *pFrame,
else
{
FireEvents();
- xAccImpl->InvalidatePosOrSize( rOldBox );
+ if (xAccImpl->GetMap()) // not if disposed by FireEvents()
+ {
+ xAccImpl->InvalidatePosOrSize(rOldBox);
+ }
}
}
else if( xParentAccImpl.is() )