From 007bfdade34d9cd469e6033c430ffa5c9b03d657 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antti=20Sepp=C3=A4l=C3=A4?= Date: Mon, 24 Sep 2007 16:08:09 +0000 Subject: [PATCH] Fix segfault. --- device.c | 4 ++-- sectionfilter.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/device.c b/device.c index c4beded..9db0480 100644 --- a/device.c +++ b/device.c @@ -3,7 +3,7 @@ * * See the README file for copyright information and how to reach the author. * - * $Id: device.c,v 1.36 2007/09/24 13:03:38 ajhseppa Exp $ + * $Id: device.c,v 1.37 2007/09/24 16:08:09 ajhseppa Exp $ */ #include "common.h" @@ -184,7 +184,7 @@ bool cIptvDevice::CloseFilter(int Handle) { debug("cIptvDevice::CloseFilter(%d): %d\n", deviceIndex, Handle); for (unsigned int i = 0; i < eMaxFilterCount; ++i) { - if (Handle == secfilters[i]->GetReadDesc()) + if (secfilters[i] && Handle == secfilters[i]->GetReadDesc()) return DeleteFilter(i); } return false; diff --git a/sectionfilter.c b/sectionfilter.c index c59fb7f..7876c04 100644 --- a/sectionfilter.c +++ b/sectionfilter.c @@ -3,7 +3,7 @@ * * See the README file for copyright information and how to reach the author. * - * $Id: sectionfilter.c,v 1.1 2007/09/24 13:03:38 ajhseppa Exp $ + * $Id: sectionfilter.c,v 1.2 2007/09/24 16:08:09 ajhseppa Exp $ */ #include "sectionfilter.h" @@ -65,7 +65,7 @@ cIptvSectionFilter::cIptvSectionFilter(int Index, int devInd, cIptvSectionFilter::~cIptvSectionFilter() { - debug("cIptvSectionFilter::~cIptvSectionfilter()\n"); + debug("cIptvSectionFilter::~cIptvSectionfilter(%d)\n", id); close(fifoDescriptor); close(readDescriptor); unlink(pipeName);