Skip to content

Commit

Permalink
pvr: fixed: garbage in returned GroupName due to out-of-scope usage o…
Browse files Browse the repository at this point in the history
…f a std::string

This fixes the channel groups for all pvr addons under Windows.
This commit partly reverts the change from 4e72ffe
  • Loading branch information
margro committed Aug 12, 2012
1 parent ca1b80a commit 6445b14
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions xbmc/pvr/channels/PVRChannelGroup.cpp
Expand Up @@ -1086,11 +1086,9 @@ int CPVRChannelGroup::GroupType(void) const
return m_iGroupType;
}

CStdString CPVRChannelGroup::GroupName(void) const
const CStdString& CPVRChannelGroup::GroupName(void) const
{
CSingleLock lock(m_critSection);
CStdString strReturn(m_strGroupName);
return strReturn;
return m_strGroupName;
}

bool CPVRChannelGroup::UpdateChannel(const CFileItem &item, bool bHidden, bool bVirtual, bool bEPGEnabled, bool bParentalLocked, int iEPGSource, int iChannelNumber, const CStdString &strChannelName, const CStdString &strIconPath, const CStdString &strStreamURL)
Expand Down
2 changes: 1 addition & 1 deletion xbmc/pvr/channels/PVRChannelGroup.h
Expand Up @@ -208,7 +208,7 @@ namespace PVR
* @brief The name of this group.
* @return The name of this group.
*/
CStdString GroupName(void) const;
const CStdString &GroupName(void) const;

/*! @name Sort methods
*/
Expand Down

0 comments on commit 6445b14

Please sign in to comment.