mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-31 01:11:12 +02:00
gui/bouquetlist.cpp: bouquet id safe-checks
This commit is contained in:
@@ -171,7 +171,7 @@ bool CBouquetList::adjustToChannelID(t_channel_id channel_id)
|
|||||||
/* used in channellist to switch bouquets up/down */
|
/* used in channellist to switch bouquets up/down */
|
||||||
int CBouquetList::showChannelList( int nBouquet)
|
int CBouquetList::showChannelList( int nBouquet)
|
||||||
{
|
{
|
||||||
if (nBouquet == -1)
|
if ((nBouquet < 0)|| (nBouquet >= (int) Bouquets.size()))
|
||||||
nBouquet = selected;
|
nBouquet = selected;
|
||||||
|
|
||||||
int nNewChannel = Bouquets[nBouquet]->channelList->exec();
|
int nNewChannel = Bouquets[nBouquet]->channelList->exec();
|
||||||
@@ -186,7 +186,7 @@ int CBouquetList::activateBouquet( int id, bool bShowChannelList)
|
|||||||
{
|
{
|
||||||
int res = -1;
|
int res = -1;
|
||||||
|
|
||||||
if(id < (int) Bouquets.size())
|
if((id >= 0) && (id < (int) Bouquets.size()))
|
||||||
selected = id;
|
selected = id;
|
||||||
|
|
||||||
if (bShowChannelList) {
|
if (bShowChannelList) {
|
||||||
|
Reference in New Issue
Block a user