[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - vcl/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Tue Sep 1 11:42:36 UTC 2020


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

New commits:
commit 3cc9def811f4bac32342175f3fda9f10dcde80bb
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Aug 31 20:33:35 2020 +0100
Commit:     Miklos Vajna <vmiklos at collabora.com>
CommitDate: Tue Sep 1 13:42:03 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/+/101769
    Tested-by: Jenkins
    Reviewed-by: Miklos Vajna <vmiklos at collabora.com>

diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index 000b660ca04a..c259853edb88 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -2015,11 +2015,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 );
-                ImplModified();
+                SetSelection( aSaveSel );
+                if (!aChars.isEmpty())
+                {
+                    ImplInsertText( aChars );
+                    ImplModified();
+                }
             }
         }
         pPopup.clear();


More information about the Libreoffice-commits mailing list