From 8b712e8fb5c7fe03ffb61a5ecf40a8516a8b5aa8 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Mon, 31 Aug 2020 20:33:35 +0100 Subject: check if Edit was disposed while insert special character was still open MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- vcl/source/control/edit.cxx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'vcl/source/control/edit.cxx') 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(); -- cgit v1.2.3