Fix segfault.

This commit is contained in:
Antti Seppälä 2007-09-24 16:08:09 +00:00
parent 679ccd0e35
commit 007bfdade3
2 changed files with 4 additions and 4 deletions

View File

@ -3,7 +3,7 @@
* *
* See the README file for copyright information and how to reach the author. * 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" #include "common.h"
@ -184,7 +184,7 @@ bool cIptvDevice::CloseFilter(int Handle)
{ {
debug("cIptvDevice::CloseFilter(%d): %d\n", deviceIndex, Handle); debug("cIptvDevice::CloseFilter(%d): %d\n", deviceIndex, Handle);
for (unsigned int i = 0; i < eMaxFilterCount; ++i) { for (unsigned int i = 0; i < eMaxFilterCount; ++i) {
if (Handle == secfilters[i]->GetReadDesc()) if (secfilters[i] && Handle == secfilters[i]->GetReadDesc())
return DeleteFilter(i); return DeleteFilter(i);
} }
return false; return false;

View File

@ -3,7 +3,7 @@
* *
* See the README file for copyright information and how to reach the author. * 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" #include "sectionfilter.h"
@ -65,7 +65,7 @@ cIptvSectionFilter::cIptvSectionFilter(int Index, int devInd,
cIptvSectionFilter::~cIptvSectionFilter() cIptvSectionFilter::~cIptvSectionFilter()
{ {
debug("cIptvSectionFilter::~cIptvSectionfilter()\n"); debug("cIptvSectionFilter::~cIptvSectionfilter(%d)\n", id);
close(fifoDescriptor); close(fifoDescriptor);
close(readDescriptor); close(readDescriptor);
unlink(pipeName); unlink(pipeName);