Ensure that ch_epg_now and next get cleared to stop false usage (getref/putref in timer callback). Fixes #1257.
This commit is contained in:
parent
62ee97b25d
commit
a49e4bc245
1 changed files with 2 additions and 1 deletions
|
@ -1354,6 +1354,8 @@ static void _epg_channel_rem_broadcast
|
|||
{
|
||||
if (new) dvr_event_replaced(ebc, new);
|
||||
RB_REMOVE(&ch->ch_epg_schedule, ebc, sched_link);
|
||||
if (ch->ch_epg_now == ebc) ch->ch_epg_now = NULL;
|
||||
if (ch->ch_epg_next == ebc) ch->ch_epg_next = NULL;
|
||||
_epg_object_putref(ebc);
|
||||
}
|
||||
|
||||
|
@ -1468,7 +1470,6 @@ static epg_broadcast_t *_epg_channel_add_broadcast
|
|||
/* Remove overlapping (before) */
|
||||
while ( (ebc = RB_PREV(ret, sched_link)) != NULL ) {
|
||||
if ( ebc->stop <= ret->start ) break;
|
||||
if ( ch->ch_epg_now == ebc ) ch->ch_epg_now = NULL;
|
||||
_epg_channel_rem_broadcast(ch, ebc, ret);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue