From: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Date: Mon, 25 Aug 2025 18:17:40 +0000 (+0000) Subject: Add safety check for NULL mux in subscription unsubscribe fix X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fheads%2Fcopilot%2Ffix-1633;p=thirdparty%2Ftvheadend.git Add safety check for NULL mux in subscription unsubscribe fix Co-authored-by: Flole998 <9951871+Flole998@users.noreply.github.com> --- diff --git a/src/subscriptions.c b/src/subscriptions.c index 4b31f53f6..2ab0d837f 100644 --- a/src/subscriptions.c +++ b/src/subscriptions.c @@ -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);