[Libreoffice-commits] core.git: cui/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Fri Sep 27 15:31:14 UTC 2019
cui/source/options/treeopt.cxx | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
New commits:
commit 572bd797719e21d84b20a4eaaa3a98f068214c2b
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Sep 27 09:02:38 2019 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Fri Sep 27 17:29:46 2019 +0200
cid#1453996 Unchecked return value
Change-Id: I0b5010aec8ad941d662e851833923a8b6b0a383d
Reviewed-on: https://gerrit.libreoffice.org/79672
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index e801425ad7a9..4165f2dfb5b3 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -575,15 +575,14 @@ OfaTreeOptionsDialog::~OfaTreeOptionsDialog()
OptionsPageInfo* OfaTreeOptionsDialog::AddTabPage(
sal_uInt16 nId, const OUString& rPageName, sal_uInt16 nGroup )
{
- OptionsPageInfo* pPageInfo = new OptionsPageInfo( nId );
-
std::unique_ptr<weld::TreeIter> xParent = xTreeLB->make_iterator();
- xTreeLB->get_iter_first(*xParent);
+ if (!xTreeLB->get_iter_first(*xParent))
+ return nullptr;
xTreeLB->iter_nth_sibling(*xParent, nGroup);
+ OptionsPageInfo* pPageInfo = new OptionsPageInfo( nId );
OUString sId(OUString::number(reinterpret_cast<sal_Int64>(pPageInfo)));;
xTreeLB->insert(xParent.get(), -1, &rPageName, &sId, nullptr, nullptr, nullptr, false, nullptr);
-
return pPageInfo;
}
More information about the Libreoffice-commits
mailing list