summaryrefslogtreecommitdiff
path: root/osd.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2012-03-03 13:25:22 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2012-03-03 13:25:22 +0100
commit78c1fee7f891e9e10cd7b617ef920b6df34d0d1f (patch)
tree4c8ecfb8cbd5d7c19f9717acf2387ea1ce5b12dc /osd.c
parent0432198e0b3fb7f77711a2ccb832cdc6c092df58 (diff)
downloadvdr-78c1fee7f891e9e10cd7b617ef920b6df34d0d1f.tar.gz
vdr-78c1fee7f891e9e10cd7b617ef920b6df34d0d1f.tar.bz2
Now checking for NULL in cOsd::AddPixmap()
Diffstat (limited to 'osd.c')
-rw-r--r--osd.c14
1 files changed, 8 insertions, 6 deletions
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;
}