sfx2/source/dialog/mgetempl.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
New commits: commit 32304eb0079079fe263b860573fa010656ab13c9 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Mon Apr 15 19:59:23 2019 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Mon Apr 15 22:24:50 2019 +0200 tdf#124730 an attempt to remove entry that isn't there Change-Id: If382f0419c8ea0a3b99c85942c05ee1e5a627e76 Reviewed-on: https://gerrit.libreoffice.org/70795 Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/sfx2/source/dialog/mgetempl.cxx b/sfx2/source/dialog/mgetempl.cxx index 67eb96db1cd8..836ca6de1164 100644 --- a/sfx2/source/dialog/mgetempl.cxx +++ b/sfx2/source/dialog/mgetempl.cxx @@ -282,7 +282,9 @@ void SfxManageStyleSheetPage::UpdateName_Impl( weld::ComboBox* pBox, { // it is the current entry, which name was modified const bool bSelect = pBox->get_active_text() == aBuf; - pBox->remove_text(aBuf); + int nOldIndex = pBox->find_text(aBuf); + if (nOldIndex != -1) + pBox->remove(nOldIndex); pBox->append_text(rNew); if (bSelect) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits