diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-10-13 20:35:39 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-10-13 22:38:33 +0100 |
commit | 505e194b1be2e21070c7a93214e719634556f8c9 (patch) | |
tree | 7ef7c9be7be1fa0cb517375c21e9fa5bd76db3a6 /svx | |
parent | bc16de624e1f2b4b6132eea2f36bc6f8cedcef5a (diff) |
coverity#1326499 Resource leak
Change-Id: I561e8f7ff472d7d2578e30145024405e74088ffc
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/form/navigatortree.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/svx/source/form/navigatortree.cxx b/svx/source/form/navigatortree.cxx index 7861e3faca17..6411f129e265 100644 --- a/svx/source/form/navigatortree.cxx +++ b/svx/source/form/navigatortree.cxx @@ -1339,6 +1339,10 @@ namespace svxform if (!xNewForm.is()) return; + Reference< XPropertySet > xPropertySet(xNewForm, UNO_QUERY); + if (!xPropertySet.is()) + return; + FmFormData* pNewFormData = new FmFormData( xNewForm, m_aNavigatorImages, pParentFormData ); @@ -1346,9 +1350,6 @@ namespace svxform OUString aName = GenerateName(pNewFormData); pNewFormData->SetText(aName); - Reference< XPropertySet > xPropertySet(xNewForm, UNO_QUERY); - if (!xPropertySet.is()) - return; try { xPropertySet->setPropertyValue( FM_PROP_NAME, makeAny(aName) ); |