Advertisement
Guest User

Untitled

a guest
Sep 25th, 2012
39
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 0.75 KB | None | 0 0
  1. diff --git a/src/epg.c b/src/epg.c
  2. index 2f2ed75..bec77bc 100644
  3. --- a/src/epg.c
  4. +++ b/src/epg.c
  5. @@ -1364,8 +1364,10 @@ static void _epg_channel_timer_callback ( void *p )
  6.    channel_t *ch = (channel_t*)p;
  7.  
  8.    /* Clear now/next */
  9. -  cur = ch->ch_epg_now;
  10. -  nxt = ch->ch_epg_next;
  11. +  if ((cur = ch->ch_epg_now))
  12. +    cur->getref(cur);
  13. +  if ((nxt = ch->ch_epg_next))
  14. +    nxt->getref(nxt);
  15.    ch->ch_epg_now = ch->ch_epg_next = NULL;
  16.  
  17.    /* Check events */
  18. @@ -1412,6 +1414,10 @@ static void _epg_channel_timer_callback ( void *p )
  19.             ch->ch_name);
  20.      htsp_channel_update_current(ch);
  21.    }
  22. +
  23. +  /* Remove refs */
  24. +  if (cur) cur->putref(cur);
  25. +  if (nxt) nxt->putref(nxt);
  26.  }
  27.  
  28.  static epg_broadcast_t *_epg_channel_add_broadcast
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement