summaryrefslogtreecommitdiff
path: root/osd.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2004-10-16 11:05:14 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2004-10-16 11:05:14 +0200
commit27895be475763321d36e476578fc7d4712f1a600 (patch)
tree01759a17c5ccb603b70cbee258264c3b1f79ab7c /osd.c
parent1a2ddff60d9722e7633971c917c7413c598ad7c1 (diff)
downloadvdr-27895be475763321d36e476578fc7d4712f1a600.tar.gz
vdr-27895be475763321d36e476578fc7d4712f1a600.tar.bz2
cOsdProvider::NewOsd() now always returns a valid pointer
Diffstat (limited to 'osd.c')
-rw-r--r--osd.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/osd.c b/osd.c
index 2877c280..6944e675 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 1.57 2004/07/18 09:23:03 kls Exp $
+ * $Id: osd.c 1.58 2004/10/16 10:31:34 kls Exp $
*/
#include "osd.h"
@@ -716,13 +716,12 @@ cOsdProvider::~cOsdProvider()
cOsd *cOsdProvider::NewOsd(int Left, int Top)
{
- if (cOsd::IsOpen()) {
- esyslog("ERROR: attempt to open OSD while it is already open!");
- return NULL;
- }
- if (osdProvider)
+ if (Level == 0 && cOsd::IsOpen())
+ esyslog("ERROR: attempt to open OSD while it is already open - using dummy OSD!");
+ else if (osdProvider)
return osdProvider->CreateOsd(Left, Top);
- esyslog("ERROR: no OSD provider available - using dummy OSD!");
+ else
+ esyslog("ERROR: no OSD provider available - using dummy OSD!");
return new cOsd(Left, Top); // create a dummy cOsd, so that access won't result in a segfault
}