[Libreoffice-commits] core.git: vcl/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Tue Sep 1 19:48:33 UTC 2020


 vcl/source/control/edit.cxx |   11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

New commits:
commit 8b712e8fb5c7fe03ffb61a5ecf40a8516a8b5aa8
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Aug 31 20:33:35 2020 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue Sep 1 21:47:54 2020 +0200

    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 at redhat.com>

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();


More information about the Libreoffice-commits mailing list