1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

Added missing NULL checks when accessing sectionHandler

This commit is contained in:
Klaus Schmidinger 2004-05-16 12:15:55 +02:00
parent 92f6e5d59a
commit 1b6a7085a5
3 changed files with 8 additions and 3 deletions

View File

@ -962,6 +962,7 @@ Marcus M
Pekka Virtanen <pekka.virtanen@sci.fi> Pekka Virtanen <pekka.virtanen@sci.fi>
for adding language code handling to the subtitling descriptor in 'libsi' 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> John Kennedy <rkennedy@ix.netcom.com>
for publishing "A Fast Bresenham Algorithm For Drawing Ellipses" (found at for publishing "A Fast Bresenham Algorithm For Drawing Ellipses" (found at

View File

@ -2797,3 +2797,5 @@ Video Disk Recorder Revision History
in the list) everything freezes and the vdr processes have to be killed with -9 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 and the driver needs to be reloaded. Maybe somebody else can find out what's
going wrong here... going wrong here...
- Added missing NULL checks when accessing sectionHandler in device.c (thanks to
Pekka Virtanen).

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * 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" #include "device.h"
@ -325,11 +325,13 @@ int cDevice::OpenFilter(u_short Pid, u_char Tid, u_char Mask)
void cDevice::AttachFilter(cFilter *Filter) void cDevice::AttachFilter(cFilter *Filter)
{ {
if (sectionHandler)
sectionHandler->Attach(Filter); sectionHandler->Attach(Filter);
} }
void cDevice::Detach(cFilter *Filter) void cDevice::Detach(cFilter *Filter)
{ {
if (sectionHandler)
sectionHandler->Detach(Filter); sectionHandler->Detach(Filter);
} }