Fix #1542 - timeshift: stop crash if speed/skip request w/o service
This can happen because XBMC may send requests even though the sub has not yet started and the relevant links been made.
This commit is contained in:
parent
1d6356a87b
commit
a9584156a3
1 changed files with 4 additions and 0 deletions
|
@ -643,6 +643,8 @@ subscription_set_speed ( th_subscription_t *s, int speed )
|
|||
streaming_message_t *sm;
|
||||
service_t *t = s->ths_service;
|
||||
|
||||
if (!t) return;
|
||||
|
||||
pthread_mutex_lock(&t->s_stream_mutex);
|
||||
|
||||
sm = streaming_msg_create_code(SMT_SPEED, speed);
|
||||
|
@ -661,6 +663,8 @@ subscription_set_skip ( th_subscription_t *s, const streaming_skip_t *skip )
|
|||
streaming_message_t *sm;
|
||||
service_t *t = s->ths_service;
|
||||
|
||||
if (!t) return;
|
||||
|
||||
pthread_mutex_lock(&t->s_stream_mutex);
|
||||
|
||||
sm = streaming_msg_create(SMT_SKIP);
|
||||
|
|
Loading…
Add table
Reference in a new issue