Skip to content

Commit

Permalink
Merge pull request #16866 from ksooo/pvr-fix-guideinfo-dialog-crash
Browse files Browse the repository at this point in the history
Fix CGUIDialogPVRGuideInfo::GetCurrentListItem crash
  • Loading branch information
ksooo committed Nov 4, 2019
2 parents 57f9d06 + 2d5d8f7 commit a4dfad6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
6 changes: 0 additions & 6 deletions xbmc/pvr/PVRManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -251,12 +251,6 @@ namespace PVR
*/
void OnPlaybackEnded(const std::shared_ptr<CFileItem> item);

/*!
* @brief Check whether there are active recordings.
* @return True if there are active recordings, false otherwise.
*/
bool IsRecording() const;

/*!
* @brief Let the background thread create epg tags for all channels.
*/
Expand Down
5 changes: 4 additions & 1 deletion xbmc/pvr/dialogs/GUIDialogPVRGuideInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,10 @@ void CGUIDialogPVRGuideInfo::SetProgInfo(const std::shared_ptr<CPVREpgInfoTag>&

CFileItemPtr CGUIDialogPVRGuideInfo::GetCurrentListItem(int offset)
{
return CFileItemPtr(new CFileItem(m_progItem));
if (!m_progItem)
return {};

return std::make_shared<CFileItem>(m_progItem);
}

void CGUIDialogPVRGuideInfo::OnInitWindow()
Expand Down

0 comments on commit a4dfad6

Please sign in to comment.