summaryrefslogtreecommitdiff
path: root/svx/source/table
diff options
context:
space:
mode:
authorTakeshi Abe <tabe@fixedpoint.jp>2014-06-30 18:17:06 +0900
committerCaolán McNamara <caolanm@redhat.com>2014-07-02 13:04:25 +0000
commitb7075e97a4323671fccfd581a9606b1f1ed4b103 (patch)
treec47c7f0219367d1fe265b3d0642447bb7140c951 /svx/source/table
parentc103775cd15b658bf5db1bda081c1ba5bd653c2a (diff)
Do not leave unreachable TableColumnUndo/TableRowUndo in case of exceptions
... which might be a memory leak otherwise. Change-Id: I5e911ba815c3df519365236043fccc7ff21c60b4 Reviewed-on: https://gerrit.libreoffice.org/9979 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svx/source/table')
-rw-r--r--svx/source/table/tablecolumn.cxx4
-rw-r--r--svx/source/table/tablerow.cxx4
2 files changed, 8 insertions, 0 deletions
diff --git a/svx/source/table/tablecolumn.cxx b/svx/source/table/tablecolumn.cxx
index 2909f3e5d936..1b0aa1706596 100644
--- a/svx/source/table/tablecolumn.cxx
+++ b/svx/source/table/tablecolumn.cxx
@@ -209,10 +209,14 @@ void SAL_CALL TableColumn::setFastPropertyValue( sal_Int32 nHandle, const Any& a
break;
}
default:
+ delete pUndo;
throw UnknownPropertyException();
}
if( !bOk )
+ {
+ delete pUndo;
throw IllegalArgumentException();
+ }
if( bChange )
{
diff --git a/svx/source/table/tablerow.cxx b/svx/source/table/tablerow.cxx
index c213e495ab40..d7449baa703f 100644
--- a/svx/source/table/tablerow.cxx
+++ b/svx/source/table/tablerow.cxx
@@ -283,10 +283,14 @@ void SAL_CALL TableRow::setFastPropertyValue( sal_Int32 nHandle, const Any& aVal
break;
}
default:
+ delete pUndo;
throw UnknownPropertyException();
}
if( !bOk )
+ {
+ delete pUndo;
throw IllegalArgumentException();
+ }
if( bChange )
{