Skip to content

Commit

Permalink
Merge pull request #12373 from lobermann/imdb_scrape_crash
Browse files Browse the repository at this point in the history
[imdb] fix crash on empty videoInfoTag
  • Loading branch information
MartijnKaijser committed Jul 29, 2017
2 parents 8da9320 + 1445537 commit d933e1d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions xbmc/video/dialogs/GUIDialogVideoInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,11 @@ void CGUIDialogVideoInfo::SetMovie(const CFileItem *item)

// setup cast list
ClearCastList();

// When the scraper throws an error, the video tag can be null here
if (!item->HasVideoInfoTag())
return;

MediaType type = item->GetVideoInfoTag()->m_type;

m_startUserrating = m_movieItem->GetVideoInfoTag()->m_iUserRating;
Expand Down
4 changes: 4 additions & 0 deletions xbmc/video/windows/GUIWindowVideoBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,10 @@ bool CGUIWindowVideoBase::ShowIMDB(CFileItemPtr item, const ScraperPtr &info2, b
CGUIDialogOK::ShowAndGetInput(CVariant{13346}, CVariant{14057});
return false;
}

// If the scraper failed above and no videoinfotag was created, return
if (!item->HasVideoInfoTag())
return false;

bool listNeedsUpdating = false;
// 3. Run a loop so that if we Refresh we re-run this block
Expand Down

0 comments on commit d933e1d

Please sign in to comment.