tdf#173510 svx: prevent another crash when table style deselected
This fixes a regression from
commit 4fb31ea85f
When you de-select a table style in Table - AutoFormat Styles,
then the checkboxes below were left enabled despite a -1 index,
so the rename and renew buttons would crash.
Change-Id: I3c9601476f874116e43387ee40e934932a44b311
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211922
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
This commit is contained in:
@@ -158,7 +158,7 @@ void SvxTableAutoFmtDlg::PopulateFormatList()
|
||||
|
||||
void SvxTableAutoFmtDlg::UpdateUIState()
|
||||
{
|
||||
const bool bCanModify = mnIndex != DEFAULT_STYLE;
|
||||
const bool bCanModify = mnIndex != DEFAULT_STYLE && mnIndex < mpFormat.size();
|
||||
mxBtnRename->set_sensitive(bCanModify);
|
||||
mxBtnRemove->set_sensitive(bCanModify);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user