mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 00:11:14 +02:00
neutrino: fix nullpointer crash if no channels are present
This commit is contained in:
committed by
Jacek Jendrzej
parent
a33086568b
commit
b8aa68a2da
@@ -147,6 +147,8 @@ void CBEChannelSelectWidget::paintItem(uint32_t itemNr, int paintNr, bool pselec
|
||||
|
||||
void CBEChannelSelectWidget::onOkKeyPressed()
|
||||
{
|
||||
if (selected >= Channels.size())
|
||||
return;
|
||||
setModified();
|
||||
if (isChannelInBouquet(selected))
|
||||
g_bouquetManager->Bouquets[bouquet]->removeService(Channels[selected]->channel_id);
|
||||
|
@@ -931,7 +931,8 @@ int EpgPlus::exec (CChannelList * pchannelList, int selectedChannelIndex, CBouqu
|
||||
}
|
||||
}
|
||||
else if (msg == CRCInput::RC_ok) {
|
||||
CNeutrinoApp::getInstance()->channelList->zapTo_ChannelID(this->selectedChannelEntry->channel->channel_id);
|
||||
if (selectedChannelEntry)
|
||||
CNeutrinoApp::getInstance()->channelList->zapTo_ChannelID(selectedChannelEntry->channel->channel_id);
|
||||
current_bouquet = bouquetList->getActiveBouquetNumber();
|
||||
}
|
||||
else if (CRCInput::isNumeric (msg)) {
|
||||
@@ -1006,7 +1007,7 @@ int EpgPlus::exec (CChannelList * pchannelList, int selectedChannelIndex, CBouqu
|
||||
menuWidgetActions.addItem (new CMenuForwarder (LOCALE_EPGPLUS_RECORD, true, NULL, &record, NULL, CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED), false);
|
||||
menuWidgetActions.addItem (new CMenuForwarder (LOCALE_EPGPLUS_REFRESH_EPG, true, NULL, &refresh, NULL, CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN), false);
|
||||
menuWidgetActions.addItem (new CMenuForwarder (LOCALE_EPGPLUS_REMIND, true, NULL, &remind, NULL, CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW), false);
|
||||
|
||||
if (selectedChannelEntry)
|
||||
menuWidgetActions.exec (NULL, "");
|
||||
|
||||
this->refreshAll = true;
|
||||
|
Reference in New Issue
Block a user