diff options
author | Robin KAY <komadori@users.sourceforge.net> | 2003-08-08 16:22:12 +0000 |
---|---|---|
committer | Robin KAY <komadori@users.sourceforge.net> | 2003-08-08 16:22:12 +0000 |
commit | 2ec31e5af87262e67cdd5b5e420b80194390795d (patch) | |
tree | 288c9b76b0754f540b711fca5a4a8ab481e2f6f3 /src | |
parent | 53dfa28d4d119175ac065eb12814fcb95cae11c9 (diff) | |
download | xine-lib-2ec31e5af87262e67cdd5b5e420b80194390795d.tar.gz xine-lib-2ec31e5af87262e67cdd5b5e420b80194390795d.tar.bz2 |
Fix segmentation fault caused by closing a conversion descriptor when none was opened.
CVS patchset: 5259
CVS date: 2003/08/08 16:22:12
Diffstat (limited to 'src')
-rw-r--r-- | src/xine-engine/osd.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/xine-engine/osd.c b/src/xine-engine/osd.c index 8c84097d6..f7e7c3e1d 100644 --- a/src/xine-engine/osd.c +++ b/src/xine-engine/osd.c @@ -746,7 +746,7 @@ static int osd_render_text (osd_object_t *osd, int x1, int y1, osd_font_t *font; int i, y; uint8_t *dst, *src; - char *inbuf; + const char *inbuf; uint16_t unicode; size_t inbytesleft; @@ -932,7 +932,9 @@ static int osd_render_text (osd_object_t *osd, int x1, int y1, } #ifndef _MSC_VER - iconv_close(cd); + if (cd != (iconv_t)-1) { + iconv_close(cd); + } #endif /* _MSC_VER */ pthread_mutex_unlock (&this->osd_mutex); |