summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSarper Akdemir <sarper.akdemir@allotropia.de>2024-12-12 10:55:50 +0100
committerThorsten Behrens <thorsten.behrens@allotropia.de>2024-12-12 15:44:41 +0100
commit4d5554b24da27ec9694e6396b32f27a2bc2aa153 (patch)
tree77a150f2939c2aaf8258ef3634939e4ff9bbdee2
parentfc9d0229adb1f222e4a6f8111489af587616cafa (diff)
sd: keep a non-owning pointer to the OverridingShell
... instead of keeping an owning shared_ptr To fix the ubsan build error <https://ci.libreoffice.org/job/lo_ubsan/3385/> Which appears to be caused from EventMultiplexer::CallListeners triggering a NotesPanelView to be deleted, and then notifying that just-deleted NotesPanelView, see <https://gerrit.libreoffice.org/c/core/+/177686/2#message-857c0180ae3e6572534d3bcd40f32000d434cc3d> Change-Id: I05e67dfeab093e7549e9b2ec4caf4a95dc743627 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178348 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de> Reviewed-by: Sarper Akdemir <sarper.akdemir@allotropia.de> (cherry picked from commit c1473de894b17f113fcb6c81f82592434e272a8c) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178352 Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de> Tested-by: allotropia jenkins <jenkins@allotropia.de>
-rw-r--r--sd/source/ui/view/ViewShellManager.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sd/source/ui/view/ViewShellManager.cxx b/sd/source/ui/view/ViewShellManager.cxx
index d7e05a8d03c2..19d8614007d4 100644
--- a/sd/source/ui/view/ViewShellManager.cxx
+++ b/sd/source/ui/view/ViewShellManager.cxx
@@ -194,7 +194,7 @@ private:
SfxShell* mpTopShell;
SfxShell* mpTopViewShell;
- std::shared_ptr<ViewShell> mpOverridingShell;
+ std::weak_ptr<ViewShell> mpOverridingShell;
void UpdateShellStack();
@@ -624,7 +624,7 @@ void ViewShellManager::Implementation::DeactivateSubShell (
std::shared_ptr<ViewShell> ViewShellManager::Implementation::GetOverridingShell()
{
- return mpOverridingShell;
+ return mpOverridingShell.lock();
}
void ViewShellManager::Implementation::RemoveOverridingMainShell()