bouquets: fix segfault while re-loading channel lists

Origin commit data
------------------
Commit: 940aef5e4e
Author: TangoCash <eric@loxat.de>
Date: 2021-09-17 (Fri, 17 Sep 2021)

Origin message was:
------------------
- bouquets: fix segfault while re-loading channel lists
This commit is contained in:
TangoCash
2021-09-17 20:36:22 +02:00
committed by vanhofen
parent f480b7cc24
commit e16730debc
2 changed files with 6 additions and 5 deletions

View File

@@ -703,7 +703,8 @@ bool CPictureViewer::GetLogoName(const uint64_t &ChannelID, const std::string &C
}
}
if (cc && (name.compare("m3u_loading_logos") != 0))
// "alternate_logos" is a helper string from zapit/src/bouquets.cpp
if (cc && (name.compare("alternate_logos") != 0))
{
if (!cc->getAlternateLogo().empty())
{

View File

@@ -990,8 +990,8 @@ void CBouquetManager::loadWebchannels(int mode)
if(!new_epgmap.empty())
channel->setEPGmap("#" + new_epgmap + "=" + buf);
}
std::string dummy = "";
if (alogo && !g_PicViewer->GetLogoName(chid, std::string(title), dummy))
std::string helper = "alternate_logos";
if (alogo && !g_PicViewer->GetLogoName(chid, std::string(title), helper))
{
channel->setAlternateLogo(std::string(alogo));
pthread_mutex_lock (&mutex);
@@ -1128,8 +1128,8 @@ void CBouquetManager::loadWebchannels(int mode)
snprintf(buf, sizeof(buf), "%llx", chid & 0xFFFFFFFFFFFFULL);
channel->setEPGmap("#" + new_epgxml + "=" + buf);
}
desc = "m3u_loading_logos";
if (!alogo.empty() && !g_PicViewer->GetLogoName(chid,title,desc))
std::string helper = "alternate_logos";
if (!alogo.empty() && !g_PicViewer->GetLogoName(chid, title, helper))
{
channel->setAlternateLogo(alogo);
pthread_mutex_lock (&mutex);