summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-04-15 19:59:23 +0100
committerCaolán McNamara <caolanm@redhat.com>2019-04-15 22:24:50 +0200
commit32304eb0079079fe263b860573fa010656ab13c9 (patch)
treeb72e029e15b7722e49522e0d44d253ead4031ae5 /sfx2
parentfad018d60d628355528deb0b0f8b3c396a691d69 (diff)
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 <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/dialog/mgetempl.cxx4
1 files changed, 3 insertions, 1 deletions
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)