summaryrefslogtreecommitdiff
path: root/svx/qa/unit/customshapes.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolan.mcnamara@collabora.com>2024-05-15 21:08:50 +0100
committerCaolán McNamara <caolan.mcnamara@collabora.com>2024-05-16 09:34:49 +0200
commit601ae6910288c7f3abdbb11de644c17b3b2d0cb5 (patch)
treed2b46c81d7a446fdc173dddd65ec6bdee89c0e23 /svx/qa/unit/customshapes.cxx
parentc8a5dc46d11f2ef1e3a66d633730d9a700ced24a (diff)
WaE: C6011 Dereferencing NULL pointer warnings
Change-Id: If4ca47bc4d8203ed7d20e1bbf1c3ebe2587c403f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167709 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'svx/qa/unit/customshapes.cxx')
-rw-r--r--svx/qa/unit/customshapes.cxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/svx/qa/unit/customshapes.cxx b/svx/qa/unit/customshapes.cxx
index 304ae64f23b2..47ab375e6037 100644
--- a/svx/qa/unit/customshapes.cxx
+++ b/svx/qa/unit/customshapes.cxx
@@ -122,6 +122,7 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf150302)
// Mark Object
SfxViewShell* pViewShell = SfxViewShell::Current();
+ CPPUNIT_ASSERT(pViewShell);
SdrView* pSdrView = pViewShell->GetDrawView();
pSdrView->MarkObj(pSdrCustomShape, pSdrView->GetSdrPageView());
@@ -157,6 +158,7 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf147409_GeomItemHash)
// Mark Object
SfxViewShell* pViewShell = SfxViewShell::Current();
+ CPPUNIT_ASSERT(pViewShell);
SdrView* pSdrView = pViewShell->GetDrawView();
pSdrView->MarkObj(pSdrCustomShape, pSdrView->GetSdrPageView());
@@ -174,6 +176,7 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf146866_GeomItemHash)
// Mark Object
SfxViewShell* pViewShell = SfxViewShell::Current();
+ CPPUNIT_ASSERT(pViewShell);
SdrView* pSdrView = pViewShell->GetDrawView();
pSdrView->MarkObj(pSdrCustomShape, pSdrView->GetSdrPageView());
@@ -502,6 +505,7 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf141021ExtrusionNorth)
// Mark Object
SfxViewShell* pViewShell = SfxViewShell::Current();
+ CPPUNIT_ASSERT(pViewShell);
SdrView* pSdrView = pViewShell->GetDrawView();
pSdrView->MarkObj(&rSdrCustomShape, pSdrView->GetSdrPageView());
@@ -509,7 +513,9 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf141021ExtrusionNorth)
SfxRequest aReq(pViewShell->GetViewFrame(), SID_EXTRUSION_DIRECTION);
SfxInt32Item aItem(SID_EXTRUSION_DIRECTION, 90);
aReq.AppendItem(aItem);
- svx::ExtrusionBar::execute(pSdrView, aReq, SfxViewFrame::Current()->GetBindings());
+ SfxViewFrame* pFrame = SfxViewFrame::Current();
+ CPPUNIT_ASSERT(pFrame);
+ svx::ExtrusionBar::execute(pSdrView, aReq, pFrame->GetBindings());
// Verify height. Without the fix in place the height would 4001.
tools::Rectangle aBoundRect(rSdrCustomShape.GetCurrentBoundRect());