Permalink
Browse files

change CGUIDialogSelect::SetItems() to create copy of list instead of…

… just setting pointer to it

fixes crash when reloading skin while select dialog is active
  • Loading branch information...
1 parent a435fa8 commit 7c936f1c8cabf24e31c77401b11594bb5e804184 @pieh pieh committed Nov 13, 2012
Showing with 6 additions and 1 deletion.
  1. +6 −1 xbmc/dialogs/GUIDialogSelect.cpp
@@ -186,7 +186,12 @@ void CGUIDialogSelect::Add(const CFileItem* pItem)
void CGUIDialogSelect::SetItems(CFileItemList* pList)
{
- m_vecList = pList;
+ // need to make internal copy of list to be sure dialog is owner of it
+ m_vecListInternal->Clear();
+ if (pList)
+ m_vecListInternal->Copy(*pList);
+
+ m_vecList = m_vecListInternal;
}
int CGUIDialogSelect::GetSelectedLabel() const

0 comments on commit 7c936f1

Please sign in to comment.