td#f119300 crash in Manage BreakPoints dialog
regression from
commit 4b5699bff5
loplugin:useuniqueptr in BreakPointList
Change-Id: Ia95a1a15563b1664de938fad7c6435fc82ebf04c
Reviewed-on: https://gerrit.libreoffice.org/59170
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
#include <basidesh.hxx>
|
||||
|
||||
#include <sfx2/dispatch.hxx>
|
||||
#include <vcl/lstbox.hxx>
|
||||
|
||||
namespace basctl
|
||||
{
|
||||
@@ -153,8 +154,9 @@ void BreakPointDialog::CheckButtons()
|
||||
IMPL_LINK( BreakPointDialog, CheckBoxHdl, Button *, pButton, void )
|
||||
{
|
||||
::CheckBox * pChkBx = static_cast<::CheckBox*>(pButton);
|
||||
BreakPoint& rBrk = GetSelectedBreakPoint();
|
||||
rBrk.bEnabled = pChkBx->IsChecked();
|
||||
BreakPoint* pBrk = GetSelectedBreakPoint();
|
||||
if (pBrk)
|
||||
pBrk->bEnabled = pChkBx->IsChecked();
|
||||
}
|
||||
|
||||
IMPL_LINK( BreakPointDialog, ComboBoxHighlightHdl, ComboBox&, rBox, void )
|
||||
@@ -175,8 +177,9 @@ IMPL_LINK( BreakPointDialog, EditModifyHdl, Edit&, rEdit, void )
|
||||
CheckButtons();
|
||||
else if (&rEdit == m_pNumericField)
|
||||
{
|
||||
BreakPoint& rBrk = GetSelectedBreakPoint();
|
||||
rBrk.nStopAfter = rEdit.GetText().toInt32();
|
||||
BreakPoint* pBrk = GetSelectedBreakPoint();
|
||||
if (pBrk)
|
||||
pBrk->nStopAfter = rEdit.GetText().toInt32();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -234,10 +237,12 @@ void BreakPointDialog::UpdateFields( BreakPoint const & rBrk )
|
||||
}
|
||||
|
||||
|
||||
BreakPoint& BreakPointDialog::GetSelectedBreakPoint()
|
||||
BreakPoint* BreakPointDialog::GetSelectedBreakPoint()
|
||||
{
|
||||
size_t nEntry = m_pComboBox->GetEntryPos( m_pComboBox->GetText() );
|
||||
return m_aModifiedBreakPointList.at( nEntry );
|
||||
sal_Int32 nEntry = m_pComboBox->GetEntryPos( m_pComboBox->GetText() );
|
||||
if (nEntry == LISTBOX_ENTRY_NOTFOUND)
|
||||
return nullptr;
|
||||
return &m_aModifiedBreakPointList.at( nEntry );
|
||||
}
|
||||
|
||||
} // namespace basctl
|
||||
|
@@ -46,7 +46,7 @@ class BreakPointDialog final : public ModalDialog
|
||||
DECL_LINK( EditModifyHdl, Edit&, void );
|
||||
DECL_LINK( ButtonHdl, Button*, void );
|
||||
void UpdateFields( BreakPoint const & rBrk );
|
||||
BreakPoint& GetSelectedBreakPoint();
|
||||
BreakPoint* GetSelectedBreakPoint();
|
||||
|
||||
|
||||
public:
|
||||
|
Reference in New Issue
Block a user