diff options
Diffstat (limited to 'sfx2/source/appl/appopen.cxx')
-rw-r--r-- | sfx2/source/appl/appopen.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sfx2/source/appl/appopen.cxx b/sfx2/source/appl/appopen.cxx index 4e1b06e522..37c67e1ef2 100644 --- a/sfx2/source/appl/appopen.cxx +++ b/sfx2/source/appl/appopen.cxx @@ -1044,9 +1044,10 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq ) if( aFileName.startsWith("#") ) // Mark without URL { SfxViewFrame *pView = pTargetFrame ? pTargetFrame->GetCurrentViewFrame() : nullptr; - if ( !pView ) + if (!pView) pView = SfxViewFrame::Current(); - pView->GetViewShell()->JumpToMark( aFileName.copy(1) ); + if (pView) + pView->GetViewShell()->JumpToMark( aFileName.copy(1) ); rReq.SetReturnValue( SfxViewFrameItem( pView ) ); return; } |