oox: fix C6011: Dereferencing NULL pointer 'pViewShell'

Change-Id: I5af775c71217010ed9a137967cbff231814ebea4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187268
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
This commit is contained in:
Xisco Fauli
2025-07-02 10:31:44 +02:00
parent 7ff0fd67cf
commit 218191750b

View File

@ -972,6 +972,7 @@ CPPUNIT_TEST_FIXTURE(OoxShapeTest, testDigitGuideName_funnel)
uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
uno::UNO_QUERY);
SfxViewShell* pViewShell = SfxViewShell::Current();
CPPUNIT_ASSERT(pViewShell);
SdrView* pSdrView = pViewShell->GetDrawView();
// Test idea: Convert the shape to a Bézier curve. Test the end coordinate of the first half