summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKatarina Behrens <bubli@bubli.org>2013-04-26 22:15:35 +0200
committerKatarina Behrens <bubli@bubli.org>2013-04-26 22:32:28 +0200
commitefc4761686b9c566d9a45fb9ab3984d7704603ba (patch)
tree5d4dbd3b82340f7e5a85c5d7858ff933780e836d
parent2b37775048b69edff81cd4f73b39bd9445b60878 (diff)
Fixed crash on deleting custom slide show
Create a custom slide show in Impress, attempt to delete it -> crash STL vector::erase returns an iterator pointing to the next element i.e. not the element we want to remove, evtl. invalid end iterator Change-Id: Ie3758fc1ae5fc5f2a934cd8bed3de4e84a0b841b
-rw-r--r--sd/source/ui/dlg/custsdlg.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/sd/source/ui/dlg/custsdlg.cxx b/sd/source/ui/dlg/custsdlg.cxx
index 8eedbf141e89..8019f4304123 100644
--- a/sd/source/ui/dlg/custsdlg.cxx
+++ b/sd/source/ui/dlg/custsdlg.cxx
@@ -165,7 +165,8 @@ IMPL_LINK( SdCustomShowDlg, ClickButtonHdl, void *, p )
sal_uInt16 nPos = m_pLbCustomShows->GetSelectEntryPos();
if( nPos != LISTBOX_ENTRY_NOTFOUND )
{
- delete *pCustomShowList->erase( pCustomShowList->begin() + nPos );
+ delete (*pCustomShowList)[nPos];
+ pCustomShowList->erase( pCustomShowList->begin() + nPos );
m_pLbCustomShows->RemoveEntry( nPos );
m_pLbCustomShows->SelectEntryPos( nPos == 0 ? nPos : nPos - 1 );
bModified = sal_True;