Skip to content

Commit

Permalink
Added nullptr check when resolving chapterName.
Browse files Browse the repository at this point in the history
  • Loading branch information
RickDB authored and RickDB committed Sep 2, 2017
1 parent e45aa1a commit cce1b0c
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions xbmc/cores/DSPlayer/ChaptersManager.cpp
Expand Up @@ -157,8 +157,13 @@ bool CChaptersManager::LoadChapters()

if (SUCCEEDED(m_pIAMExtendedSeeking->GetMarkerName(i, &chapterName)))
{
g_charsetConverter.wToUTF8(chapterName, infos->name);
SysFreeString(chapterName);
if (chapterName)
{
g_charsetConverter.wToUTF8(chapterName, infos->name);
SysFreeString(chapterName);
}
else
infos->name = "Unknown chapter";
}
else
infos->name = "Unknown chapter";
Expand Down

0 comments on commit cce1b0c

Please sign in to comment.