summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorJian Fang Zhang <zhangjf@apache.org>2012-09-05 03:44:09 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-05-25 13:28:12 +0100
commit853a7ae81de88a9b2903a673a40b6a3943868c6a (patch)
tree4be0bea264f62fbed2327005a2d130d621c6635e /svx
parenta6659d6df6d68a4df43e70376cf6eea1fb54b932 (diff)
Resolves: #i120746# FormScriptingEnvironment is never released
when created in the FmXUndoEnvironment ctor it is never released Found by: zhangjf Patch by: zhangjf (cherry picked from commit d52fc99575db0d30b19a69dadcd2c3544584ecab) Change-Id: Iaeba1018551441f3bb13f90d3d42ac2855e285e6
Diffstat (limited to 'svx')
-rw-r--r--svx/source/form/fmundo.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/svx/source/form/fmundo.cxx b/svx/source/form/fmundo.cxx
index cf1567b73ba1..7b07764c60e8 100644
--- a/svx/source/form/fmundo.cxx
+++ b/svx/source/form/fmundo.cxx
@@ -193,6 +193,9 @@ FmXUndoEnvironment::FmXUndoEnvironment(FmFormModel& _rModel)
FmXUndoEnvironment::~FmXUndoEnvironment()
{
DBG_DTOR(FmXUndoEnvironment,NULL);
+ if ( !m_bDisposed ) // i120746, call FormScriptingEnvironment::dispose to avoid memory leak
+ m_pScriptingEnv->dispose();
+
if (m_pPropertySetCache)
delete static_cast<PropertySetInfoCache*>(m_pPropertySetCache);
}