From 1b6a7085a5cd9c64eedc06bfc2cfd7399a46d5e4 Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Sun, 16 May 2004 12:15:55 +0200 Subject: Added missing NULL checks when accessing sectionHandler --- device.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'device.c') 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 -- cgit v1.2.3