diff options
author | Caolán McNamara <caolanm@redhat.com> | 2023-05-06 19:14:25 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2023-05-06 22:00:41 +0200 |
commit | 7ef7bf9304414488ed7ceec71bb9c2400ebb99b8 (patch) | |
tree | 502a37b2dcbab2ba5f140732efa6224f09c0ca78 | |
parent | 6c042848b688f64b3c56d65dd9dc5fe85412660a (diff) |
cid#1529285 Uninitialized pointer field
and
cid#1529286 Explicit null dereferenced
Change-Id: Ibe7832ddcfe0239aa71626075209ef6a052af914
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151452
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | sw/source/ui/index/swuiidxmrk.cxx | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sw/source/ui/index/swuiidxmrk.cxx b/sw/source/ui/index/swuiidxmrk.cxx index b810ad14aef8..140b4e48d0a0 100644 --- a/sw/source/ui/index/swuiidxmrk.cxx +++ b/sw/source/ui/index/swuiidxmrk.cxx @@ -1094,7 +1094,7 @@ class SwCreateAuthEntryDlg_Impl : public weld::GenericDialogController std::unique_ptr<weld::CheckButton> m_xLocalPageCB; std::unique_ptr<weld::SpinButton> m_xLocalPageSB; std::unique_ptr<weld::ComboBox> m_xTargetTypeListBox; - weld::Entry* m_xTargetURLField; + weld::Entry* m_pTargetURLField; DECL_LINK(IdentifierHdl, weld::ComboBox&, void); DECL_LINK(ShortNameHdl, weld::Entry&, void); @@ -1592,6 +1592,7 @@ SwCreateAuthEntryDlg_Impl::SwCreateAuthEntryDlg_Impl(weld::Window* pParent, , m_xBox(m_xBuilder->weld_container("box")) , m_xLeft(m_xBuilder->weld_container("leftgrid")) , m_xRight(m_xBuilder->weld_container("rightgrid")) + , m_pTargetURLField(nullptr) { bool bLeft = true; sal_Int32 nLeftRow(0), nRightRow(0); @@ -1696,8 +1697,9 @@ SwCreateAuthEntryDlg_Impl::SwCreateAuthEntryDlg_Impl(weld::Window* pParent, if (AUTH_FIELD_TARGET_URL == aCurInfo.nToxField) { - m_xTargetURLField = m_pEdits[nIndex].get(); - m_xTargetURLField->set_sensitive( + m_pTargetURLField = m_pEdits[nIndex].get(); + assert(m_xTargetTypeListBox); + m_pTargetURLField->set_sensitive( m_xTargetTypeListBox->get_active() == SwAuthorityField::TargetType::UseTargetURL); } @@ -1858,7 +1860,8 @@ IMPL_LINK(SwCreateAuthEntryDlg_Impl, EnableHdl, weld::ComboBox&, rBox, void) IMPL_LINK(SwCreateAuthEntryDlg_Impl, TargetTypeHdl, weld::ComboBox&, rBox, void) { - m_xTargetURLField->set_sensitive(rBox.get_active() == SwAuthorityField::TargetType::UseTargetURL); + assert(m_pTargetURLField); + m_pTargetURLField->set_sensitive(rBox.get_active() == SwAuthorityField::TargetType::UseTargetURL); } IMPL_LINK(SwCreateAuthEntryDlg_Impl, BrowseHdl, weld::Button&, rButton, void) |