summaryrefslogtreecommitdiff
path: root/sc/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-06-21 14:56:19 +0100
committerCaolán McNamara <caolanm@redhat.com>2019-06-21 21:42:28 +0200
commit49c92a3b46b8f4c3303ea17a508f91a0c87d54f6 (patch)
tree043bfe48acafb59bacaa08010f313b898bf5b6f4 /sc/source
parent945455c0af44bebe8ca0b111bf6664450192f919 (diff)
remove then dispose, not dispose then remove
asserts seen in inline spelling in calc otherwise Change-Id: If78142cb0a3e23de6eb0e5d40622a4c7d06df8ec Reviewed-on: https://gerrit.libreoffice.org/74512 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc/source')
-rw-r--r--sc/source/ui/Accessibility/AccessibleDocument.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/sc/source/ui/Accessibility/AccessibleDocument.cxx b/sc/source/ui/Accessibility/AccessibleDocument.cxx
index f9ea7367a6bb..b7876c1a6f61 100644
--- a/sc/source/ui/Accessibility/AccessibleDocument.cxx
+++ b/sc/source/ui/Accessibility/AccessibleDocument.cxx
@@ -1495,6 +1495,10 @@ void ScAccessibleDocument::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
if (mpTempAccEdit)
{
mpTempAccEdit->LostFocus();
+ }
+ RemoveChild(mxTempAcc, true);
+ if (mpTempAccEdit)
+ {
// tdf#125982 a11y use-after-free of editengine by
// ScAccessibleEditObjectTextData living past the
// the editengine of the editview passed in above
@@ -1502,7 +1506,6 @@ void ScAccessibleDocument::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
mpTempAccEdit->dispose();
mpTempAccEdit = nullptr;
}
- RemoveChild(mxTempAcc, true);
if (mpAccessibleSpreadsheet.is() && mpViewShell && mpViewShell->IsActive())
mpAccessibleSpreadsheet->GotFocus();
else if( mpViewShell && mpViewShell->IsActive())