mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 00:11:14 +02:00
capmt: avoid use cam after delete
This commit is contained in:
@@ -297,7 +297,7 @@ bool CCamManager::SetMode(t_channel_id channel_id, enum runmode mode, bool start
|
|||||||
cam->sendMessage(NULL, 0, false);
|
cam->sendMessage(NULL, 0, false);
|
||||||
/* clean up channel_map with stopped record/stream/pip services NOT live-tv */
|
/* clean up channel_map with stopped record/stream/pip services NOT live-tv */
|
||||||
it = channel_map.find(channel_id);
|
it = channel_map.find(channel_id);
|
||||||
if(it != channel_map.end() && newmask != 0)
|
if(it != channel_map.end() && newmask != 0 && it->second != cam)
|
||||||
{
|
{
|
||||||
delete it->second;
|
delete it->second;
|
||||||
channel_map.erase(channel_id);
|
channel_map.erase(channel_id);
|
||||||
|
Reference in New Issue
Block a user