diff --git a/cui/source/dialogs/hldoctp.cxx b/cui/source/dialogs/hldoctp.cxx index 52bda50b47ef..8a3974c7c2a0 100644 --- a/cui/source/dialogs/hldoctp.cxx +++ b/cui/source/dialogs/hldoctp.cxx @@ -207,6 +207,9 @@ IMPL_LINK_NOARG(SvxHyperlinkDocTp, ClickTargetHdl_Impl, weld::Button&, void) { ShowMarkWnd(); + if (!mxMarkWnd) + return; + if ( GetPathType ( maStrURL ) == EPathType::ExistsFile || maStrURL.isEmpty() || maStrURL.equalsIgnoreAsciiCase( INET_FILE_SCHEME ) || @@ -216,13 +219,10 @@ IMPL_LINK_NOARG(SvxHyperlinkDocTp, ClickTargetHdl_Impl, weld::Button&, void) weld::WaitObject aWait(mpDialog->getDialog()); - if (mxMarkWnd) - { - if ( maStrURL.equalsIgnoreAsciiCase( INET_FILE_SCHEME ) ) - mxMarkWnd->RefreshTree ( u""_ustr ); - else - mxMarkWnd->RefreshTree ( maStrURL ); - } + if ( maStrURL.equalsIgnoreAsciiCase( INET_FILE_SCHEME ) ) + mxMarkWnd->RefreshTree ( u""_ustr ); + else + mxMarkWnd->RefreshTree ( maStrURL ); } else mxMarkWnd->SetError( LERR_DOCNOTOPEN );