summaryrefslogtreecommitdiff
path: root/sw/source/core/view/viewimp.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/view/viewimp.cxx')
-rw-r--r--sw/source/core/view/viewimp.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/sw/source/core/view/viewimp.cxx b/sw/source/core/view/viewimp.cxx
index 317480500eac..3cadcfd3556a 100644
--- a/sw/source/core/view/viewimp.cxx
+++ b/sw/source/core/view/viewimp.cxx
@@ -213,7 +213,8 @@ void SwViewShellImp::MakeDrawView()
// to use GetOut() and check the existing cases.
// Check worked well. Took a look at viewing, printing, PDF export and print preview with a test
// document which has an empty 2nd page (right page, see bug)
- OutputDevice* pOutDevForDrawView = GetShell()->GetWin();
+ auto pWin = GetShell()->GetWin();
+ OutputDevice* pOutDevForDrawView = pWin ? pWin->GetOutDev() : nullptr;
if(!pOutDevForDrawView)
{