fix possible legacy path translation crash (thanks vdrfan)
authormontellese <montellese@xbmc.org>
Sat, 18 May 2013 09:37:35 +0000 (11:37 +0200)
committermontellese <montellese@xbmc.org>
Sat, 18 May 2013 09:39:15 +0000 (11:39 +0200)
xbmc/filesystem/MusicDatabaseDirectory.cpp
xbmc/filesystem/VideoDatabaseDirectory.cpp

index c00bf5a..e1bf8e4 100644 (file)
@@ -45,6 +45,7 @@ CMusicDatabaseDirectory::~CMusicDatabaseDirectory(void)
 bool CMusicDatabaseDirectory::GetDirectory(const CStdString& strPath, CFileItemList &items)
 {
   CStdString path = CLegacyPathTranslation::TranslateMusicDbPath(strPath);
+  items.SetPath(path);
   auto_ptr<CDirectoryNode> pNode(CDirectoryNode::ParseURL(path));
 
   if (!pNode.get())
index 9d06e44..25705f6 100644 (file)
@@ -46,6 +46,7 @@ CVideoDatabaseDirectory::~CVideoDatabaseDirectory(void)
 bool CVideoDatabaseDirectory::GetDirectory(const CStdString& strPath, CFileItemList &items)
 {
   CStdString path = CLegacyPathTranslation::TranslateVideoDbPath(strPath);
+  items.SetPath(path);
   auto_ptr<CDirectoryNode> pNode(CDirectoryNode::ParseURL(path));
 
   if (!pNode.get())