sd/source/ui/inc/FormShellManager.hxx  |    3 +++
 sd/source/ui/view/FormShellManager.cxx |    9 +++++++--
 2 files changed, 10 insertions(+), 2 deletions(-)

New commits:
commit 9d77abfa4fd0f352a7a30f3140ab0adfed71bd85
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Mon Apr 24 08:56:37 2023 +0100
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Mon Apr 24 12:59:15 2023 +0200

    cid#1401342 silence Uncaught exception
    
    Change-Id: I1ff8deeb07c13cc7dee6e5d86f004f840723f056
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150903
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/sd/source/ui/inc/FormShellManager.hxx 
b/sd/source/ui/inc/FormShellManager.hxx
index 8b4a773ae5bd..08e31b98ff2f 100644
--- a/sd/source/ui/inc/FormShellManager.hxx
+++ b/sd/source/ui/inc/FormShellManager.hxx
@@ -132,6 +132,9 @@ private:
         (and may be removed in the future.)
     */
     virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint) override;
+
+    /** dtor body */
+    void ImplDestroy();
 };
 
 } // end of namespace sd
diff --git a/sd/source/ui/view/FormShellManager.cxx 
b/sd/source/ui/view/FormShellManager.cxx
index bfd1808342ab..d2cb6ebfee21 100644
--- a/sd/source/ui/view/FormShellManager.cxx
+++ b/sd/source/ui/view/FormShellManager.cxx
@@ -64,9 +64,9 @@ FormShellManager::FormShellManager (ViewShellBase& rBase)
     RegisterAtCenterPane();
 }
 
-FormShellManager::~FormShellManager()
+void FormShellManager::ImplDestroy()
 {
-    suppress_fun_call_w_exception(SetFormShell(nullptr));
+    SetFormShell(nullptr);
     UnregisterAtCenterPane();
 
     // Unregister from the EventMultiplexer.
@@ -81,6 +81,11 @@ FormShellManager::~FormShellManager()
     }
 }
 
+FormShellManager::~FormShellManager()
+{
+    suppress_fun_call_w_exception(ImplDestroy());
+}
+
 void FormShellManager::SetFormShell (FmFormShell* pFormShell)
 {
     if (mpFormShell == pFormShell)

Reply via email to