summaryrefslogtreecommitdiff
path: root/sd/source/ui
diff options
context:
space:
mode:
Diffstat (limited to 'sd/source/ui')
-rw-r--r--sd/source/ui/tools/PreviewRenderer.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/sd/source/ui/tools/PreviewRenderer.cxx b/sd/source/ui/tools/PreviewRenderer.cxx
index 7a14af3ee683..b3eb95402df3 100644
--- a/sd/source/ui/tools/PreviewRenderer.cxx
+++ b/sd/source/ui/tools/PreviewRenderer.cxx
@@ -199,13 +199,16 @@ bool PreviewRenderer::Initialize (
const Size& rPixelSize,
const bool bObeyHighContrastMode)
{
- if (pPage == nullptr)
+ if (!pPage)
return false;
SetupOutputSize(*pPage, rPixelSize);
SdDrawDocument& rDocument(static_cast< SdDrawDocument& >(pPage->getSdrModelFromSdrPage()));
DrawDocShell* pDocShell = rDocument.GetDocSh();
+ if (!pDocShell)
+ return false;
+
// Create view
ProvideView (pDocShell);
if (mpView == nullptr)