summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2024-09-05 16:29:08 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2024-09-05 20:06:47 +0200
commit6605f58aeddb21629b842040b81df55a29443fd0 (patch)
tree2554cd3959ccf154d38d57fc6e1d0860ce1c8c2f /cui
parent629a9d68eeadd1f1349c97c0131c7d1d55ad867b (diff)
cui: fix another plausible crash
Similar to 6633afe0ff18e5921eb96be2f863f28bd7e1110d "fix crash in Hyperlink dialog" Change-Id: Ia53ffeffaca775c66fb269e109d5fdb8c32d0066 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172917 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'cui')
-rw-r--r--cui/source/dialogs/hldoctp.cxx11
1 files changed, 7 insertions, 4 deletions
diff --git a/cui/source/dialogs/hldoctp.cxx b/cui/source/dialogs/hldoctp.cxx
index c8ed1de2fa6b..52bda50b47ef 100644
--- a/cui/source/dialogs/hldoctp.cxx
+++ b/cui/source/dialogs/hldoctp.cxx
@@ -216,10 +216,13 @@ IMPL_LINK_NOARG(SvxHyperlinkDocTp, ClickTargetHdl_Impl, weld::Button&, void)
weld::WaitObject aWait(mpDialog->getDialog());
- if ( maStrURL.equalsIgnoreAsciiCase( INET_FILE_SCHEME ) )
- mxMarkWnd->RefreshTree ( u""_ustr );
- else
- mxMarkWnd->RefreshTree ( maStrURL );
+ if (mxMarkWnd)
+ {
+ if ( maStrURL.equalsIgnoreAsciiCase( INET_FILE_SCHEME ) )
+ mxMarkWnd->RefreshTree ( u""_ustr );
+ else
+ mxMarkWnd->RefreshTree ( maStrURL );
+ }
}
else
mxMarkWnd->SetError( LERR_DOCNOTOPEN );