summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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()