[Libreoffice-commits] core.git: sw/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Sat Sep 15 14:39:58 UTC 2018
sw/source/ui/envelp/label1.cxx | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
New commits:
commit 8ed86da5ff66ace29e99d5a7871500c1acb37265
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sat Sep 15 13:24:04 2018 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Sat Sep 15 16:39:38 2018 +0200
coverity#1439339 assert non-null
and
coverity#1439334 assert non-null
Change-Id: Ia4e51b729fc335d0ac5beeaa39b112f2a7f9e1ae
Reviewed-on: https://gerrit.libreoffice.org/60522
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sw/source/ui/envelp/label1.cxx b/sw/source/ui/envelp/label1.cxx
index c9d62cb79f1d..f69b1ce9f8dc 100644
--- a/sw/source/ui/envelp/label1.cxx
+++ b/sw/source/ui/envelp/label1.cxx
@@ -591,7 +591,10 @@ DeactivateRC SwPrivateDataPage::DeactivatePage(SfxItemSet* _pSet)
bool SwPrivateDataPage::FillItemSet(SfxItemSet* rSet)
{
- SwLabItem aItem = static_cast<const SwLabItem&>(GetDialogExampleSet()->Get(FN_LABEL));
+ const SfxItemSet* pExampleSet = GetDialogExampleSet();
+ assert(pExampleSet);
+ SwLabItem aItem = static_cast<const SwLabItem&>(pExampleSet->Get(FN_LABEL));
+
aItem.m_aPrivFirstName = m_xFirstNameED->get_text();
aItem.m_aPrivName = m_xNameED->get_text();
aItem.m_aPrivShortCut = m_xShortCutED->get_text();
@@ -681,7 +684,9 @@ DeactivateRC SwBusinessDataPage::DeactivatePage(SfxItemSet* _pSet)
bool SwBusinessDataPage::FillItemSet(SfxItemSet* rSet)
{
- SwLabItem aItem = static_cast<const SwLabItem&>(GetDialogExampleSet()->Get(FN_LABEL));
+ const SfxItemSet* pExampleSet = GetDialogExampleSet();
+ assert(pExampleSet);
+ SwLabItem aItem = static_cast<const SwLabItem&>(pExampleSet->Get(FN_LABEL));
aItem.m_aCompCompany = m_xCompanyED->get_text();
aItem.m_aCompCompanyExt= m_xCompanyExtED->get_text();
More information about the Libreoffice-commits
mailing list