1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

Now deleting any previously allocated pixmaps in cOsd::SetAreas()

This commit is contained in:
Klaus Schmidinger 2013-02-13 12:55:26 +01:00
parent 8ef71dbbdf
commit b6b9a148c6
2 changed files with 6 additions and 1 deletions

View File

@ -7606,3 +7606,4 @@ Video Disk Recorder Revision History
- Fixed the description of the OSD drawing functions DrawEllipse() (the values -5...-8
for the Quadrants parameter are not implemented).
- Made cOsd::DestroyPixmap() "NULL proof".
- Now deleting any previously allocated pixmaps in cOsd::SetAreas().

6
osd.c
View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: osd.c 2.36 2013/02/13 12:52:07 kls Exp $
* $Id: osd.c 2.37 2013/02/13 12:55:26 kls Exp $
*/
#include "osd.h"
@ -1803,6 +1803,10 @@ eOsdError cOsd::SetAreas(const tArea *Areas, int NumAreas)
if (Result == oeOk) {
while (numBitmaps)
delete bitmaps[--numBitmaps];
for (int i = 0; i < pixmaps.Size(); i++) {
delete pixmaps[i];
pixmaps[i] = NULL;
}
width = height = 0;
isTrueColor = NumAreas == 1 && Areas[0].bpp == 32;
if (isTrueColor) {