Related: tdf#141499 don't grab focus during teardown of dialog

Change-Id: Ib55825294b4276cf36d7ce13562dc52b71f2a5bb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113615
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
diff --git a/cui/source/dialogs/cuihyperdlg.cxx b/cui/source/dialogs/cuihyperdlg.cxx
index f4da049..42d17b2 100644
--- a/cui/source/dialogs/cuihyperdlg.cxx
+++ b/cui/source/dialogs/cuihyperdlg.cxx
@@ -150,6 +150,8 @@ SvxHpLinkDlg::SvxHpLinkDlg(SfxBindings* pBindings, SfxChildWindow* pChild, weld:

SvxHpLinkDlg::~SvxHpLinkDlg()
{
    mbGrabFocus = false; // don't do any grab if tear-down moves focus around during destruction

    // delete config item, so the base class (SfxModelessDialogController) can not load it on the next start
    SvtViewOptions aViewOpt( EViewType::TabDialog, OUString::number(SID_HYPERLINK_DIALOG) );
    aViewOpt.Delete();