From 2bcf09f2ab0cb33d4faee6a0d9e738850c63519c Mon Sep 17 00:00:00 2001 From: Nick Burrett Date: Wed, 29 Apr 2015 07:59:28 +0100 Subject: [PATCH] Fix crash when trying to configure adapters that are already in use. If another application has an adapter open, then la==NULL. Skip the adapter so that another can be configured. --- src/input/mpegts/linuxdvb/linuxdvb_adapter.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/input/mpegts/linuxdvb/linuxdvb_adapter.c b/src/input/mpegts/linuxdvb/linuxdvb_adapter.c index 99602d206..843809395 100644 --- a/src/input/mpegts/linuxdvb/linuxdvb_adapter.c +++ b/src/input/mpegts/linuxdvb/linuxdvb_adapter.c @@ -399,6 +399,10 @@ linuxdvb_adapter_add ( const char *path ) /* Relock before exit */ pthread_mutex_lock(&global_lock); + /* Adapter couldn't be opened; there's nothing to work with */ + if (!la) + return; + #if DVB_VER_ATLEAST(5,5) memset(fetypes, 0, sizeof(fetypes)); LIST_FOREACH(lfe, &la->la_frontends, lfe_link) -- 2.47.2