]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
capmt: fix another crash introduced with the ok timer code, fixes #4783
authorJaroslav Kysela <perex@perex.cz>
Tue, 12 Dec 2017 14:37:15 +0000 (15:37 +0100)
committerJaroslav Kysela <perex@perex.cz>
Tue, 12 Dec 2017 14:37:15 +0000 (15:37 +0100)
src/descrambler/capmt.c

index e3eac35b740ae4ecf4cb8c367ffa267b5bec0ae0..6f41263a9b1c71748241975b8c1a18bff02b89df 100644 (file)
@@ -2482,7 +2482,8 @@ capmt_service_start(caclient_t *cac, service_t *s)
   tvh_cond_signal(&capmt->capmt_cond, 0);
 
 fin:
-  mtimer_arm_rel(&ct->ct_ok_timer, capmt_ok_timer_cb, ct, sec2mono(3)/2);
+  if (ct)
+    mtimer_arm_rel(&ct->ct_ok_timer, capmt_ok_timer_cb, ct, sec2mono(3)/2);
   pthread_mutex_unlock(&t->s_stream_mutex);
   pthread_mutex_unlock(&capmt->capmt_mutex);