gui/bouquetlist.cpp: bouquet id safe-checks

Origin commit data
------------------
Branch: ni/coolstream
Commit: d71ad8700a
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2012-10-23 (Tue, 23 Oct 2012)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
[CST] Focus
2012-10-23 16:15:53 +04:00
parent 1bd4b814b8
commit b0a61fe6c7

View File

@@ -171,7 +171,7 @@ bool CBouquetList::adjustToChannelID(t_channel_id channel_id)
/* used in channellist to switch bouquets up/down */
int CBouquetList::showChannelList( int nBouquet)
{
if (nBouquet == -1)
if ((nBouquet < 0)|| (nBouquet >= (int) Bouquets.size()))
nBouquet = selected;
int nNewChannel = Bouquets[nBouquet]->channelList->exec();
@@ -186,7 +186,7 @@ int CBouquetList::activateBouquet( int id, bool bShowChannelList)
{
int res = -1;
if(id < (int) Bouquets.size())
if((id >= 0) && (id < (int) Bouquets.size()))
selected = id;
if (bShowChannelList) {