summaryrefslogtreecommitdiff
path: root/PLUGINS/src/osddemo
diff options
context:
space:
mode:
Diffstat (limited to 'PLUGINS/src/osddemo')
-rw-r--r--PLUGINS/src/osddemo/HISTORY9
-rw-r--r--PLUGINS/src/osddemo/osddemo.c12
2 files changed, 16 insertions, 5 deletions
diff --git a/PLUGINS/src/osddemo/HISTORY b/PLUGINS/src/osddemo/HISTORY
index 1270fbf..ac386b0 100644
--- a/PLUGINS/src/osddemo/HISTORY
+++ b/PLUGINS/src/osddemo/HISTORY
@@ -25,3 +25,12 @@ VDR Plugin 'osddemo' Revision History
2011-02-20: Version 0.2.0
- Added support for TrueColor OSD.
+
+2011-03-28: Version 0.2.1
+
+- Added Cancel(3) to ~cTrueColorDemo() (thanks to Reinhard Nissl).
+- Added a missing font deletion in cTrueColorDemo::Action() (thanks to Reinhard Nissl).
+
+2011-04-17: Version 0.2.2
+
+- Fixed a possible NULL pointer dereference in osddemo.c (reported by Paul Menzel).
diff --git a/PLUGINS/src/osddemo/osddemo.c b/PLUGINS/src/osddemo/osddemo.c
index 2e6a33b..9ad9df7 100644
--- a/PLUGINS/src/osddemo/osddemo.c
+++ b/PLUGINS/src/osddemo/osddemo.c
@@ -3,13 +3,13 @@
*
* See the README file for copyright information and how to reach the author.
*
- * $Id: osddemo.c 2.3 2011/02/26 12:08:13 kls Exp $
+ * $Id: osddemo.c 2.5 2011/04/17 13:05:13 kls Exp $
*/
#include <vdr/osd.h>
#include <vdr/plugin.h>
-static const char *VERSION = "0.2.0";
+static const char *VERSION = "0.2.2";
static const char *DESCRIPTION = "Demo of arbitrary OSD setup";
static const char *MAINMENUENTRY = "Osd Demo";
@@ -103,6 +103,7 @@ cTrueColorDemo::cTrueColorDemo(void)
cTrueColorDemo::~cTrueColorDemo()
{
+ Cancel(3);
delete osd;
}
@@ -262,12 +263,13 @@ void cTrueColorDemo::Action(void)
case 3: {
if (cFont *Font = cFont::CreateFont(DefaultFontOsd, osd->Height() / 10)) {
NextPixmap = CreateTextPixmap("Millions of colors", Line, 1, clrYellow, clrTransparent, Font);
+ delete Font;
if (NextPixmap) {
FadeInPixmap = NextPixmap;
+ Start = cTimeMs::Now();
+ StartLine = Line;
+ Line += NextPixmap->DrawPort().Height();
}
- Start = cTimeMs::Now();
- StartLine = Line;
- Line += NextPixmap->DrawPort().Height();
}
State++;
}