Skip to content

Commit

Permalink
FIX: Crash when generating thumbnails (at least with mysql on Windows)
Browse files Browse the repository at this point in the history
  • Loading branch information
koying committed Nov 1, 2012
1 parent 0be99e9 commit a5dee6a
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion xbmc/video/VideoThumbLoader.cpp
Expand Up @@ -408,7 +408,16 @@ void CVideoThumbLoader::OnJobComplete(unsigned int jobID, bool success, CJob* jo
CVideoInfoTag* info = loader->m_item.GetVideoInfoTag(); CVideoInfoTag* info = loader->m_item.GetVideoInfoTag();


if (loader->m_thumb && info->m_iDbId > 0 && !info->m_type.empty()) if (loader->m_thumb && info->m_iDbId > 0 && !info->m_type.empty())
m_database->SetArtForItem(info->m_iDbId, info->m_type, "thumb", loader->m_item.GetArt("thumb")); {
// This runs in a different thread than the CVideoThumbLoader object.
CVideoDatabase db;
if (db.Open())
{
db.SetArtForItem(info->m_iDbId, info->m_type, "thumb", loader->m_item.GetArt("thumb"));
db.Close();
}

}


if (m_pStreamDetailsObs) if (m_pStreamDetailsObs)
m_pStreamDetailsObs->OnStreamDetails(info->m_streamDetails, info->m_strFileNameAndPath, info->m_iFileId); m_pStreamDetailsObs->OnStreamDetails(info->m_streamDetails, info->m_strFileNameAndPath, info->m_iFileId);
Expand Down

0 comments on commit a5dee6a

Please sign in to comment.