svx/source/tbxctrls/tbcontrl.cxx |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 2e2d0a65e349d78f18bc2157569dab687d6165e9
Author:     Xisco Fauli <xiscofa...@libreoffice.org>
AuthorDate: Tue Oct 15 16:06:41 2024 +0200
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Tue Oct 15 18:08:54 2024 +0200

    svx: check SfxObjectShell::Current()
    
    Change-Id: Ie8e504491d350d582620a5c421d6243239d437d0
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174976
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>

diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index 31e0fdc3f109..6cab2fac0af4 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -3932,9 +3932,9 @@ namespace
 
             std::vector<sfx::CurrencyID> aCurrencyIDs;
 
-            SfxObjectShell* pDocShell = SfxObjectShell::Current();
-            if (auto pModelAccessor = pDocShell->GetDocumentModelAccessor())
-                aCurrencyIDs = pModelAccessor->getDocumentCurrencies();
+            if (SfxObjectShell* pDocShell = SfxObjectShell::Current())
+                if (auto pModelAccessor = 
pDocShell->GetDocumentModelAccessor())
+                    aCurrencyIDs = pModelAccessor->getDocumentCurrencies();
 
             SvxCurrencyToolBoxControl::GetCurrencySymbols(aList, true, 
aCurrencyList, aCurrencyIDs);
 

Reply via email to