diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2022-10-09 10:05:51 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-10-09 12:09:46 +0200 |
commit | 1a86be908952aea376d37473adbab091a5440a35 (patch) | |
tree | 178677f08ecfa805a787831da20cc907b8109b26 /svx/source/svdraw/svdouno.cxx | |
parent | 0d463de3adc204af6892cc2b2c2d8a698237fb0c (diff) |
tdf#151417 crash in draw, activating Form controls
regression from
commit 8611f6e259b807b4f19c8dc0eab86ca648891ce3
Author: Noel Grandin <noel.grandin@collabora.co.uk>
Date: Thu May 27 10:27:46 2021 +0200
ref-count SdrObject
Change-Id: I1798cead8ed72ad59799c40d0e99f3424f9e382b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141134
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx/source/svdraw/svdouno.cxx')
-rw-r--r-- | svx/source/svdraw/svdouno.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/svx/source/svdraw/svdouno.cxx b/svx/source/svdraw/svdouno.cxx index 09de889e33e2..82832c98b620 100644 --- a/svx/source/svdraw/svdouno.cxx +++ b/svx/source/svdraw/svdouno.cxx @@ -139,6 +139,7 @@ SdrUnoObj::SdrUnoObj( : SdrRectObj(rSdrModel), m_pImpl( new SdrUnoObjDataHolder ) { + osl_atomic_increment(&m_refCount); // prevent deletion during creation m_bIsUnoObj = true; m_pImpl->pEventListener = new SdrControlEventListenerImpl(this); @@ -146,6 +147,7 @@ SdrUnoObj::SdrUnoObj( // only an owner may create independently if (!rModelName.isEmpty()) CreateUnoControlModel(rModelName); + osl_atomic_decrement(&m_refCount); } SdrUnoObj::SdrUnoObj( SdrModel& rSdrModel, SdrUnoObj const & rSource) |