mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-31 01:11:12 +02:00
zapit/src/bouquets.cpp: fix invalid iterator advance in moveService/Bouquet
This commit is contained in:
@@ -152,7 +152,8 @@ void CZapitBouquet::moveService(const unsigned int oldPosition, const unsigned i
|
|||||||
CZapitChannel* tmp = *it;
|
CZapitChannel* tmp = *it;
|
||||||
channels->erase(it);
|
channels->erase(it);
|
||||||
|
|
||||||
advance(it, newPosition - oldPosition);
|
it = channels->begin();
|
||||||
|
advance(it, newPosition);
|
||||||
channels->insert(it, tmp);
|
channels->insert(it, tmp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -604,7 +605,8 @@ void CBouquetManager::moveBouquet(const unsigned int oldId, const unsigned int n
|
|||||||
CZapitBouquet* tmp = *it;
|
CZapitBouquet* tmp = *it;
|
||||||
Bouquets.erase(it);
|
Bouquets.erase(it);
|
||||||
|
|
||||||
advance(it, newId - oldId);
|
it = Bouquets.begin();
|
||||||
|
advance(it, newId);
|
||||||
Bouquets.insert(it, tmp);
|
Bouquets.insert(it, tmp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user