summaryrefslogtreecommitdiff
path: root/vcl/source/control/edit.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-08-31 20:33:35 +0100
committerCaolán McNamara <caolanm@redhat.com>2020-09-01 21:47:54 +0200
commit8b712e8fb5c7fe03ffb61a5ecf40a8516a8b5aa8 (patch)
treef7bfa1e20fc98a386f24f1c5dd104b862287d0a3 /vcl/source/control/edit.cxx
parent3db362c4788864b250c511c930c1b908d4b47ca7 (diff)
check if Edit was disposed while insert special character was still open
seen when testing renaming tabs in basic IDE Change-Id: Id0a5d7ae54f789f04701ac7dd9c18608704238d8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101768 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/source/control/edit.cxx')
-rw-r--r--vcl/source/control/edit.cxx11
1 files changed, 7 insertions, 4 deletions
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index f90a7f0bd8ed..b14789aaf133 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -2022,11 +2022,14 @@ void Edit::Command( const CommandEvent& rCEvt )
else if (sCommand == "specialchar" && pImplFncGetSpecialChars)
{
OUString aChars = pImplFncGetSpecialChars(GetFrameWeld(), GetFont());
- SetSelection( aSaveSel );
- if (!aChars.isEmpty())
+ if (!IsDisposed()) // destroyed while the insert special character dialog was still open
{
- ImplInsertText( aChars );
- Modify();
+ SetSelection( aSaveSel );
+ if (!aChars.isEmpty())
+ {
+ ImplInsertText( aChars );
+ Modify();
+ }
}
}
pPopup.clear();