summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dxr3osd.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/dxr3osd.c b/dxr3osd.c
index 64a2460..9a20ef1 100644
--- a/dxr3osd.c
+++ b/dxr3osd.c
@@ -235,6 +235,7 @@ void cDxr3Osd::Flush()
int top = Top();
int left = Left();
+ bool scaling = false;
// check if we need to scale the osd
if (horizontal < 720 || vertical < 576) {
@@ -258,6 +259,7 @@ void cDxr3Osd::Flush()
cBitmap *scaled = cScaler::scaleBitmap(bmap, width, height);
scaled->Replace(*Palette);
+ scaling = true;
bmap = scaled;
}
@@ -268,6 +270,12 @@ void cDxr3Osd::Flush()
bmap->Clean();
}
+ // check if we need to free the bitmap allocated by the method
+ // cScaler::scaleBitmap
+ if (scaling) {
+ delete bmap;
+ }
+
#if 0
if (last->Elapsed() < cDxr3ConfigData::instance()->GetOsdFlushRate())
return;