summaryrefslogtreecommitdiff
path: root/cui/source/customize
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2022-12-15 20:17:37 +0000
committerCaolán McNamara <caolanm@redhat.com>2022-12-16 09:59:06 +0000
commit56e0b27d39e266be49fac93361944878ff763acd (patch)
tree634a126d74c5e5344ee044a20b1a945e7163ad84 /cui/source/customize
parent4a998d9eea012896d4a5d256048407a766fc0bbd (diff)
misc: check SfxViewFrame::Current()
SfxViewFrame::Current() is a festering wound, these ones look like they were safe anyway, so no need to backport. But with enough checked static analysis will kick in to flag new unchecked ones. Change-Id: I2925c4fa4e2d48c1e676ffe7951e65120192517e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144277 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'cui/source/customize')
-rw-r--r--cui/source/customize/cfg.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index 2099a1b861c6..91584562a647 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -1293,8 +1293,11 @@ OUString SvxConfigPage::GetFrameWithDefaultAndIdentify( uno::Reference< frame::X
_inout_rxFrame = xDesktop->getCurrentFrame();
}
- if ( !_inout_rxFrame.is() && SfxViewFrame::Current() )
- _inout_rxFrame = SfxViewFrame::Current()->GetFrame().GetFrameInterface();
+ if ( !_inout_rxFrame.is())
+ {
+ if (SfxViewFrame* pViewFrame = SfxViewFrame::Current())
+ _inout_rxFrame = pViewFrame->GetFrame().GetFrameInterface();
+ }
if ( !_inout_rxFrame.is() )
{