Skip to content

Commit

Permalink
third time try to fix reloadchannels segfault with alternate_logos
Browse files Browse the repository at this point in the history
  • Loading branch information
satbaby committed Oct 19, 2021
1 parent f31602f commit cf8c0ac
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/gui/channellist.h
Expand Up @@ -192,6 +192,7 @@ class CChannelList : public CListHelpers, public sigc::trackable

void SetChannelList(ZapitChannelList* zlist);
void addChannel(CZapitChannel* chan);
void ClearChannelList(){if (!(*chanlist).empty()) (*chanlist).clear();};

CZapitChannel* getChannel(int number);
CZapitChannel* getChannel(t_channel_id channel_id);
Expand Down
2 changes: 1 addition & 1 deletion src/gui/streaminfo2.cpp
Expand Up @@ -1127,7 +1127,7 @@ void CStreamInfo2::paint_techinfo(int xpos, int ypos)
CZapitChannel * cc = NULL;
if (channel->getChannelID() & 0xFFFFFFFFFFFFULL)
if (CNeutrinoApp::getInstance()->channelList)
cc = CNeutrinoApp::getInstance()->channelList->getChannel(channel->getChannelID());
cc = CServiceManager::getInstance()->FindChannel(channel->getChannelID());

if (cc)
{
Expand Down
2 changes: 1 addition & 1 deletion src/zapit/src/zapit.cpp
Expand Up @@ -1503,7 +1503,7 @@ bool CZapit::ParseCommand(CBasicMessage::Header &rmsg, int connfd)
case CZapitMessages::CMD_REINIT_CHANNELS: {
// Houdini: save actual channel to restore it later, old version's channel was set to scans.conf initial channel
t_channel_id cid= current_channel ? current_channel->getChannelID() : 0;

CNeutrinoApp::getInstance()->channelList->ClearChannelList();
PrepareChannels();

current_channel = CServiceManager::getInstance()->FindChannel(cid);
Expand Down

0 comments on commit cf8c0ac

Please sign in to comment.