aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKai Sommerfeld <kai.sommerfeld@gmx.com>2016-04-24 13:32:08 +0200
committerKai Sommerfeld <kai.sommerfeld@gmx.com>2016-04-24 13:32:08 +0200
commit6d9a57d134c4473bbf9857ba1eeb00d1245cbed7 (patch)
tree65ac8f735c239c1da63121e14e98b92c35078987
parentd9cdd67f903f557e042649b9139041e1b9b33ef5 (diff)
parent152ca76cd10e0533671a397c13d83dc3ed05f3ea (diff)
Merge pull request #9668 from janbar/fix_crash_GetEPG
[PVR] fix crash returning wrong type for CEpgPtr
-rw-r--r--xbmc/epg/EpgContainer.cpp8
-rw-r--r--xbmc/pvr/channels/PVRChannel.cpp2
2 files changed, 5 insertions, 5 deletions
diff --git a/xbmc/epg/EpgContainer.cpp b/xbmc/epg/EpgContainer.cpp
index 7b3d478544..b2e98019e9 100644
--- a/xbmc/epg/EpgContainer.cpp
+++ b/xbmc/epg/EpgContainer.cpp
@@ -373,11 +373,11 @@ void CEpgContainer::Process(void)
CEpgPtr CEpgContainer::GetById(int iEpgId) const
{
if (iEpgId < 0)
- return NULL;
+ return CEpgPtr();
CSingleLock lock(m_critSection);
const auto &epgEntry = m_epgs.find((unsigned int) iEpgId);
- return epgEntry != m_epgs.end() ? epgEntry->second : NULL;
+ return epgEntry != m_epgs.end() ? epgEntry->second : CEpgPtr();
}
CEpgInfoTagPtr CEpgContainer::GetTagById(const CPVRChannelPtr &channel, unsigned int iBroadcastId) const
@@ -403,7 +403,7 @@ CEpgPtr CEpgContainer::GetByChannel(const CPVRChannel &channel) const
return epgEntry.second;
}
- return NULL;
+ return CEpgPtr();
}
void CEpgContainer::InsertFromDatabase(int iEpgID, const std::string &strName, const std::string &strScraperName)
@@ -435,7 +435,7 @@ void CEpgContainer::InsertFromDatabase(int iEpgID, const std::string &strName, c
CEpgPtr CEpgContainer::CreateChannelEpg(CPVRChannelPtr channel)
{
if (!channel)
- return NULL;
+ return CEpgPtr();
WaitForUpdateFinish(true);
LoadFromDB();
diff --git a/xbmc/pvr/channels/PVRChannel.cpp b/xbmc/pvr/channels/PVRChannel.cpp
index b084263fa0..7e26db9a67 100644
--- a/xbmc/pvr/channels/PVRChannel.cpp
+++ b/xbmc/pvr/channels/PVRChannel.cpp
@@ -172,7 +172,7 @@ CEpgPtr CPVRChannel::GetEPG(void) const
iEpgId = m_iEpgId;
}
- return iEpgId > 0 ? g_EpgContainer.GetById(iEpgId) : NULL;
+ return iEpgId > 0 ? g_EpgContainer.GetById(iEpgId) : CEpgPtr();
}
bool CPVRChannel::UpdateFromClient(const CPVRChannelPtr &channel)