diff --git a/sc/source/ui/view/preview.cxx b/sc/source/ui/view/preview.cxx index bc2d355f3daa..da05322957b5 100644 --- a/sc/source/ui/view/preview.cxx +++ b/sc/source/ui/view/preview.cxx @@ -705,7 +705,7 @@ void ScPreview::SetZoom(sal_uInt16 nNewZoom) SetMapMode( aMMMode ); bInSetZoom = true; // don't scroll during SetYOffset in UpdateScrollBars - if ( Window* pWin = pViewShell->GetWindow() ) + if ( Window* pWin = ( pViewShell->GetViewFrame() ? &pViewShell->GetViewFrame()->GetWindow() : NULL ) ) pViewShell->AdjustPosSizePixel( pWin->GetPosPixel(), pWin->GetSizePixel() ); else pViewShell->UpdateScrollBars();