From 78c1fee7f891e9e10cd7b617ef920b6df34d0d1f Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Sat, 3 Mar 2012 13:25:22 +0100 Subject: Now checking for NULL in cOsd::AddPixmap() --- CONTRIBUTORS | 1 + HISTORY | 4 ++++ config.h | 10 +++++----- osd.c | 14 ++++++++------ 4 files changed, 18 insertions(+), 11 deletions(-) diff --git a/CONTRIBUTORS b/CONTRIBUTORS index d2ef1f3f..df8639ab 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -2284,6 +2284,7 @@ Christoph Haubrich for adding support for HbbTV to libsi for fixing cRecording::LengthInSeconds(), which wrongfully rounded the result to full minutes + for suggesting to check for NULL in cOsd::AddPixmap() Pekka Mauno for fixing cSchedule::GetFollowingEvent() in case there is currently no present diff --git a/HISTORY b/HISTORY index 9c4e7e39..a59f4187 100644 --- a/HISTORY +++ b/HISTORY @@ -6959,3 +6959,7 @@ Video Disk Recorder Revision History is actually going to be switched or has actually been switched successfully" which was made in version 1.1.10, so please report if this has any unwanted side effects. + +2012-03-03: Version 1.7.26 + +- Now checking for NULL in cOsd::AddPixmap() (suggested by Christoph Haubrich). diff --git a/config.h b/config.h index 77199680..af5a76ff 100644 --- a/config.h +++ b/config.h @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: config.h 2.43 2012/02/29 12:28:01 kls Exp $ + * $Id: config.h 2.44 2012/03/03 13:25:22 kls Exp $ */ #ifndef __CONFIG_H @@ -22,13 +22,13 @@ // VDR's own version number: -#define VDRVERSION "1.7.25" -#define VDRVERSNUM 10725 // Version * 10000 + Major * 100 + Minor +#define VDRVERSION "1.7.26" +#define VDRVERSNUM 10726 // Version * 10000 + Major * 100 + Minor // The plugin API's version number: -#define APIVERSION "1.7.25" -#define APIVERSNUM 10725 // Version * 10000 + Major * 100 + Minor +#define APIVERSION "1.7.26" +#define APIVERSNUM 10726 // Version * 10000 + Major * 100 + Minor // When loading plugins, VDR searches them by their APIVERSION, which // may be smaller than VDRVERSION in case there have been no changes to diff --git a/osd.c b/osd.c index f9a76428..dc775231 100644 --- a/osd.c +++ b/osd.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: osd.c 2.25 2012/03/02 10:48:19 kls Exp $ + * $Id: osd.c 2.26 2012/03/03 13:20:15 kls Exp $ */ #include "osd.h" @@ -1701,11 +1701,13 @@ void cOsd::DestroyPixmap(cPixmap *Pixmap) cPixmap *cOsd::AddPixmap(cPixmap *Pixmap) { - LOCK_PIXMAPS; - if (numPixmaps < MAXOSDPIXMAPS) - return pixmaps[numPixmaps++] = Pixmap; - else - esyslog("ERROR: too many OSD pixmaps requested (maximum is %d)", MAXOSDPIXMAPS); + if (Pixmap) { + LOCK_PIXMAPS; + if (numPixmaps < MAXOSDPIXMAPS) + return pixmaps[numPixmaps++] = Pixmap; + else + esyslog("ERROR: too many OSD pixmaps requested (maximum is %d)", MAXOSDPIXMAPS); + } return NULL; } -- cgit v1.2.3