sfx2/source/view/viewsh.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit fb53e83372f139bceb5ebfaaae633875efeec240
Author:     Mike Kaganski <mike.kagan...@collabora.com>
AuthorDate: Fri Oct 28 09:51:13 2022 +0300
Commit:     Mike Kaganski <mike.kagan...@collabora.com>
CommitDate: Fri Oct 28 10:28:08 2022 +0200

    Small simplification
    
    Change-Id: I9aed483fd21b040c486526488917398aaafbe3a5
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141953
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>

diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index fe7991553afc..1363d07c1eb5 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -845,8 +845,8 @@ void SfxViewShell::Activate( bool bMDI )
     if ( bMDI )
     {
         SfxObjectShell *pSh = GetViewFrame()->GetObjectShell();
-        if ( pSh->GetModel().is() )
-            pSh->GetModel()->setCurrentController( 
GetViewFrame()->GetFrame().GetController() );
+        if (const auto xModel = pSh->GetModel())
+            xModel->setCurrentController(GetController());
 
         SetCurrentDocument();
     }

Reply via email to