mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Fixed a crash in cOsd::SetAreas() in case CreatePixmap() returns NULL
This commit is contained in:
parent
62596f991e
commit
909e6c6249
5
osd.c
5
osd.c
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: osd.c 4.1 2015/03/08 13:54:47 kls Exp $
|
* $Id: osd.c 4.2 2015/03/25 08:57:05 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "osd.h"
|
#include "osd.h"
|
||||||
@ -1842,7 +1842,10 @@ eOsdError cOsd::SetAreas(const tArea *Areas, int NumAreas)
|
|||||||
width = Areas[0].x2 - Areas[0].x1 + 1;
|
width = Areas[0].x2 - Areas[0].x1 + 1;
|
||||||
height = Areas[0].y2 - Areas[0].y1 + 1;
|
height = Areas[0].y2 - Areas[0].y1 + 1;
|
||||||
cPixmap *Pixmap = CreatePixmap(0, cRect(Areas[0].x1, Areas[0].y1, width, height));
|
cPixmap *Pixmap = CreatePixmap(0, cRect(Areas[0].x1, Areas[0].y1, width, height));
|
||||||
|
if (Pixmap)
|
||||||
Pixmap->Clear();
|
Pixmap->Clear();
|
||||||
|
else
|
||||||
|
Result = oeOutOfMemory;
|
||||||
bitmaps[numBitmaps++] = new cBitmap(10, 10, 8); // dummy bitmap for GetBitmap()
|
bitmaps[numBitmaps++] = new cBitmap(10, 10, 8); // dummy bitmap for GetBitmap()
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
Loading…
Reference in New Issue
Block a user