diff options
author | phintuka <phintuka> | 2008-09-26 13:17:43 +0000 |
---|---|---|
committer | phintuka <phintuka> | 2008-09-26 13:17:43 +0000 |
commit | 0bcb4524561c14f3d414c7e209459ac94ad52b2b (patch) | |
tree | 2876af001bf78919043d164b7a4ae50e5fdfd51c | |
parent | 45a40815324f5c25e7b5ebb9e6993e8eec046796 (diff) | |
download | xineliboutput-unlabeled-1.24.2.tar.gz xineliboutput-unlabeled-1.24.2.tar.bz2 |
1.0.2: Backported bugfixes from CVS trunkunlabeled-1.24.2
- Fixed segfault when committing uninitialized OSD (Thanks to Rolf Ahrenberg)
-rw-r--r-- | osd.c | 20 |
1 files changed, 11 insertions, 9 deletions
@@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: osd.c,v 1.24 2008-04-29 12:44:25 phintuka Exp $ + * $Id: osd.c,v 1.24.2.1 2008-09-26 13:17:43 phintuka Exp $ * */ @@ -333,14 +333,16 @@ void cXinelibOsd::Flush(void) /* XXX what if only palette has been changed ? */ int NumColors; const tColor *Colors = Bitmap->Colors(NumColors); - osd_rect_t DirtyArea = {x1:x1, y1:y1, x2:x2, y2:y2}; - CmdRle(i, - Left() + Bitmap->X0(), Top() + Bitmap->Y0(), - Bitmap->Width(), Bitmap->Height(), - (unsigned char *)Bitmap->Data(0,0), - NumColors, (unsigned int *)Colors, - &DirtyArea); - SendDone++; + if (Colors) { + osd_rect_t DirtyArea = {x1:x1, y1:y1, x2:x2, y2:y2}; + CmdRle(i, + Left() + Bitmap->X0(), Top() + Bitmap->Y0(), + Bitmap->Width(), Bitmap->Height(), + (unsigned char *)Bitmap->Data(0,0), + NumColors, (unsigned int *)Colors, + &DirtyArea); + SendDone++; + } } Bitmap->Clean(); } |