From b5ddaedfb3c12bcafe08b6b61268de2e286fb8ea Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Thu, 26 Apr 2012 10:28:39 +0200 Subject: Fixed cDevice::StillPicture(), making sure it doesn't call the derived class's function if no buffer has been allocated --- device.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'device.c') diff --git a/device.c b/device.c index cb5cd830..9c382a11 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 2.59 2012/04/04 09:48:00 kls Exp $ + * $Id: device.c 2.60 2012/04/26 09:40:36 kls Exp $ */ #include "device.h" @@ -1181,8 +1181,10 @@ void cDevice::StillPicture(const uchar *Data, int Length) return; } } - StillPicture(buf, Size); - free(buf); + if (buf) { + StillPicture(buf, Size); + free(buf); + } } } -- cgit v1.2.3