diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-08-26 12:37:07 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-08-26 21:43:33 +0200 |
commit | f0f576d2d91e8baa674fae65b3e2a024f1f81c45 (patch) | |
tree | 965b86f86a519dbe46b80f4bb6b7f51e418bbace /svx | |
parent | 205c47443ea43341cacec52acbe53a470f41acc6 (diff) |
fix impress crash in shape listener
after
commit ec940941e0bd7db15c5cf7d43df82226e0d849dc
Date: Tue Aug 20 17:03:13 2019 +0200
tdf#119388 add new UNO listener/broadcaster
grumble grumble stoopid AccessiblePageShape that overrides
AccessibleShape but doesn't actually set any shape on it.
Also, there appear to multiple copies of something listening to the same
shape somewhere, but I didn't track that further.
Change-Id: I78713716788dd99b1f56519d960b43e5538c1304
Reviewed-on: https://gerrit.libreoffice.org/78120
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/accessibility/AccessibleShape.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/svx/source/accessibility/AccessibleShape.cxx b/svx/source/accessibility/AccessibleShape.cxx index e9966e3c63ef..5bf62fccfd3b 100644 --- a/svx/source/accessibility/AccessibleShape.cxx +++ b/svx/source/accessibility/AccessibleShape.cxx @@ -140,7 +140,7 @@ void AccessibleShape::Init() mpChildrenManager->Update(); // Register at model as document::XEventListener. - if (maShapeTreeInfo.GetModelBroadcaster().is()) + if (mxShape.is() && maShapeTreeInfo.GetModelBroadcaster().is()) maShapeTreeInfo.GetModelBroadcaster()->addShapeEventListener(mxShape, static_cast<document::XShapeEventListener*>(this)); @@ -1064,7 +1064,7 @@ void AccessibleShape::disposing() pStateSet->RemoveState (AccessibleStateType::FOCUSED); // Unregister from model. - if (maShapeTreeInfo.GetModelBroadcaster().is()) + if (mxShape.is() && maShapeTreeInfo.GetModelBroadcaster().is()) maShapeTreeInfo.GetModelBroadcaster()->removeShapeEventListener(mxShape, static_cast<document::XShapeEventListener*>(this)); |