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

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Thu Sep 9 08:57:22 UTC 2021


 svx/source/unodraw/unoshtxt.cxx |    2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 49297dc0b5fd4f8ef9f7b650342fe462f76d08d3
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Tue Sep 7 11:24:44 2021 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Thu Sep 9 10:56:50 2021 +0200

    add assert to verify that lock() calls do not accidentally nest
    
    Change-Id: I6582de99867f98a9afaf219c3bdd53c1f5fca509
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121772
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/svx/source/unodraw/unoshtxt.cxx b/svx/source/unodraw/unoshtxt.cxx
index e24f7c657bf3..cfb01211c129 100644
--- a/svx/source/unodraw/unoshtxt.cxx
+++ b/svx/source/unodraw/unoshtxt.cxx
@@ -795,6 +795,8 @@ void SvxTextEditSourceImpl::UpdateData()
 
 void SvxTextEditSourceImpl::lock()
 {
+    // if this assert ever fires, we will need to make this a counter instead of a boolean
+    assert(!mbIsLocked && "cannot nest these loc() calls");
     mbIsLocked = true;
     if( mpOutliner )
     {


More information about the Libreoffice-commits mailing list