summaryrefslogtreecommitdiff
path: root/slideshow/source
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2024-07-10 08:58:41 +0200
committerSzymon Kłos <szymon.klos@collabora.com>2024-07-11 15:12:58 +0200
commit2fe59dc6e8b5ac9c6b312d1e4a3f4c71e1d0f5bc (patch)
tree31d1e9fc1b0d35c3aac116571d028ce1d9a06477 /slideshow/source
parent2dce213ce9f399c6ce1a3e928f34fa27988fa833 (diff)
lok: sd: slideshow render: avoid using nullptr
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com> Change-Id: I9368a256185aa336c6cc3ed398ff1d28f6498453 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170306 Tested-by: Jenkins
Diffstat (limited to 'slideshow/source')
-rw-r--r--slideshow/source/engine/slide/slideimpl.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/slideshow/source/engine/slide/slideimpl.cxx b/slideshow/source/engine/slide/slideimpl.cxx
index a03839dab1d4..1468b24bff5a 100644
--- a/slideshow/source/engine/slide/slideimpl.cxx
+++ b/slideshow/source/engine/slide/slideimpl.cxx
@@ -404,6 +404,9 @@ void LOKSlideRenderer::renderMasterPageImpl(VirtualDevice& rDevice)
while (!mpMPShapesFunctor->isImportDone())
{
ShapeSharedPtr const& rShape(mpMPShapesFunctor->importShape());
+ if (!rShape)
+ continue;
+
uno::Reference<drawing::XShape> xShape = rShape->getXShape();
if (xShape.is())
{
@@ -449,6 +452,9 @@ void LOKSlideRenderer::renderTextFieldsImpl(VirtualDevice& rDevice)
while( !mpTFShapesFunctor->isImportDone() )
{
ShapeSharedPtr const& rShape(mpTFShapesFunctor->importShape());
+ if (!rShape)
+ continue;
+
uno::Reference<drawing::XShape> xShape = rShape->getXShape();
if (xShape.is())
{