Skip to content

Commit

Permalink
Merge pull request #265 from phunkyfish/initialise-pointer-fix
Browse files Browse the repository at this point in the history
Fix nullptr initialisation
  • Loading branch information
phunkyfish authored Aug 18, 2019
2 parents 53d179c + 42ef255 commit cf64ac7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pvr.iptvsimple/addon.xml.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<addon
id="pvr.iptvsimple"
version="4.2.0"
version="4.2.1"
name="PVR IPTV Simple Client"
provider-name="nightik">
<requires>@ADDON_DEPENDS@</requires>
Expand Down
3 changes: 3 additions & 0 deletions pvr.iptvsimple/changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
v4.2.1
- Fix nullptr initialisation

v4.2.0
- Add support for sub-title/actor/director/writer in XML

Expand Down
4 changes: 2 additions & 2 deletions src/PVRIptvData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ bool PVRIptvData::LoadEPG(time_t iStart, time_t iEnd)
m_epg.clear();

int iBroadCastId = 0;
xml_node<>* pChannelNode;
xml_node<>* pChannelNode = nullptr;
for (pChannelNode = pRootElement->first_node("channel"); pChannelNode; pChannelNode = pChannelNode->next_sibling("channel"))
{
std::string strName;
Expand Down Expand Up @@ -296,7 +296,7 @@ bool PVRIptvData::LoadEPG(time_t iStart, time_t iEnd)
}
}

PVRIptvEpgChannel* epg;
PVRIptvEpgChannel* epg = nullptr;
for (pChannelNode = pRootElement->first_node("programme"); pChannelNode; pChannelNode = pChannelNode->next_sibling("programme"))
{
std::string strId;
Expand Down

0 comments on commit cf64ac7

Please sign in to comment.