summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorCaolán McNamara <caolan.mcnamara@collabora.com>2024-05-15 11:32:57 +0100
committerCaolán McNamara <caolan.mcnamara@collabora.com>2024-05-15 20:46:29 +0200
commitb5835c23cdf533be015e64d61ce1df250180f1fb (patch)
treece726b0cb3fd3d18206a2ef29b3619c16e4cccda /sfx2
parentd5ff0410e7df5ca95ec3076386881e49eb46ddca (diff)
WaE: C6011 Dereferencing NULL pointer warnings
Change-Id: I1d603f804bada2a6cd9fd8784da4de125a2b87fe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167663 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/qa/cppunit/view.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/sfx2/qa/cppunit/view.cxx b/sfx2/qa/cppunit/view.cxx
index e0e8c69b2a36..9141e4fba36b 100644
--- a/sfx2/qa/cppunit/view.cxx
+++ b/sfx2/qa/cppunit/view.cxx
@@ -43,7 +43,9 @@ CPPUNIT_TEST_FIXTURE(Sfx2ViewTest, testReloadPage)
aSet.Put(SfxInt32Item(SID_PAGE_NUMBER, 1));
SfxRequest aReq(SID_RELOAD, SfxCallMode::SLOT, aSet);
pFrame->ExecReload_Impl(aReq);
- uno::Reference<frame::XModel> xModel = SfxObjectShell::Current()->GetBaseModel();
+ SfxObjectShell* pDocSh = SfxObjectShell::Current();
+ CPPUNIT_ASSERT(pDocSh);
+ uno::Reference<frame::XModel> xModel = pDocSh->GetBaseModel();
mxComponent = xModel;
// Check the current page after reload.