]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
Add safety check for NULL mux in subscription unsubscribe fix copilot/fix-1633 1908/head
authorcopilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Mon, 25 Aug 2025 18:17:40 +0000 (18:17 +0000)
committercopilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Mon, 25 Aug 2025 18:17:40 +0000 (18:17 +0000)
Co-authored-by: Flole998 <9951871+Flole998@users.noreply.github.com>
src/subscriptions.c

index 4b31f53f6e825e9a1d7b0dec1e90a3cc2060815b..2ab0d837ffc876b14de3976df53d020df28a1e92 100644 (file)
@@ -717,7 +717,7 @@ subscription_unsubscribe(th_subscription_t *s, int flags)
     mpegts_mux_t *mm = ms->s_dvb_mux;
     LIST_REMOVE(s, ths_mux_link);
     /* Only remove raw service if no other subscriptions are using it */
-    if (LIST_EMPTY(&mm->mm_raw_subs)) {
+    if (mm && LIST_EMPTY(&mm->mm_raw_subs)) {
       tvhdebug(LS_SUBSCRIPTION, "%04X: removing raw service - no remaining subscriptions", 
                shortid(s));
       service_remove_raw(raw);