Kaydet (Commit) efc47616 authored tarafından Katarina Behrens's avatar Katarina Behrens

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
üst 2b377750
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment