summaryrefslogtreecommitdiff
path: root/svx/source/svdraw
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2022-09-03 14:19:56 +0100
committerCaolán McNamara <caolanm@redhat.com>2022-09-03 16:08:46 +0200
commit8c896f7405f77f96e7204fef9e9fa0fc7d48fe15 (patch)
tree1365b83409ab20f39e9eecca98e4dd02905e5a3c /svx/source/svdraw
parent9699f6e2aa13cd82d96740d96d8f9bf7637b68fe (diff)
crashtesting: SdrMediaObj destroyed before ctor completes
fix similar to SdrOle2Obj ctor seen on loading ooo88783-2.sxi presumably since: commit 8611f6e259b807b4f19c8dc0eab86ca648891ce3 Date: Thu May 27 10:27:46 2021 +0200 ref-count SdrObject Change-Id: I06acecec81632f4e15f5e80384bb90154a54c9d2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139324 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svx/source/svdraw')
-rw-r--r--svx/source/svdraw/svdomedia.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/svx/source/svdraw/svdomedia.cxx b/svx/source/svdraw/svdomedia.cxx
index f5d12d76e79c..421ead2fe082 100644
--- a/svx/source/svdraw/svdomedia.cxx
+++ b/svx/source/svdraw/svdomedia.cxx
@@ -79,10 +79,14 @@ SdrMediaObj::SdrMediaObj(
: SdrRectObj(rSdrModel, rRect)
,m_xImpl( new Impl )
{
+ osl_atomic_increment(&m_refCount);
+
const bool bUndo(rSdrModel.IsUndoEnabled());
rSdrModel.EnableUndo(false);
MakeNameUnique();
rSdrModel.EnableUndo(bUndo);
+
+ osl_atomic_decrement(&m_refCount);
}
SdrMediaObj::~SdrMediaObj()