summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2004-05-16 12:15:55 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2004-05-16 12:15:55 +0200
commit1b6a7085a5cd9c64eedc06bfc2cfd7399a46d5e4 (patch)
tree77bc5e45ff69396f6cfbbbe4ac27a402007cb455
parent92f6e5d59aadf5ef7ba9cde638ce6f77cffd096a (diff)
downloadvdr-1b6a7085a5cd9c64eedc06bfc2cfd7399a46d5e4.tar.gz
vdr-1b6a7085a5cd9c64eedc06bfc2cfd7399a46d5e4.tar.bz2
Added missing NULL checks when accessing sectionHandler
-rw-r--r--CONTRIBUTORS1
-rw-r--r--HISTORY2
-rw-r--r--device.c8
3 files changed, 8 insertions, 3 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index 684d05b1..700c5f71 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -962,6 +962,7 @@ Marcus Mönnig <minibbjd@gmx.de>
Pekka Virtanen <pekka.virtanen@sci.fi>
for adding language code handling to the subtitling descriptor in 'libsi'
+ for adding missing NULL checks when accessing sectionHandler in device.c
John Kennedy <rkennedy@ix.netcom.com>
for publishing "A Fast Bresenham Algorithm For Drawing Ellipses" (found at
diff --git a/HISTORY b/HISTORY
index d12d1fcf..1c618bf9 100644
--- a/HISTORY
+++ b/HISTORY
@@ -2797,3 +2797,5 @@ Video Disk Recorder Revision History
in the list) everything freezes and the vdr processes have to be killed with -9
and the driver needs to be reloaded. Maybe somebody else can find out what's
going wrong here...
+- Added missing NULL checks when accessing sectionHandler in device.c (thanks to
+ Pekka Virtanen).
diff --git a/device.c b/device.c
index 9da29579..0c2b76dc 100644
--- a/device.c
+++ b/device.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: device.c 1.54 2004/04/17 10:07:10 kls Exp $
+ * $Id: device.c 1.55 2004/05/16 12:14:47 kls Exp $
*/
#include "device.h"
@@ -325,12 +325,14 @@ int cDevice::OpenFilter(u_short Pid, u_char Tid, u_char Mask)
void cDevice::AttachFilter(cFilter *Filter)
{
- sectionHandler->Attach(Filter);
+ if (sectionHandler)
+ sectionHandler->Attach(Filter);
}
void cDevice::Detach(cFilter *Filter)
{
- sectionHandler->Detach(Filter);
+ if (sectionHandler)
+ sectionHandler->Detach(Filter);
}
bool cDevice::ProvidesSource(int Source) const