Mercurial > mplayer.hg
changeset 19650:d89179256560
More checks in ass_render_event.
author | eugeni |
---|---|
date | Sun, 03 Sep 2006 17:25:04 +0000 |
parents | 8b8288f9a28f |
children | 8135cbd2dbc5 |
files | libass/ass_render.c |
diffstat | 1 files changed, 9 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/libass/ass_render.c Sun Sep 03 17:09:53 2006 +0000 +++ b/libass/ass_render.c Sun Sep 03 17:25:04 2006 +0000 @@ -1514,6 +1514,15 @@ int alignment, halign, valign; int device_x = 0, device_y = 0; + if (!event->Style) { + mp_msg(MSGT_GLOBAL, MSGL_WARN, "No style found!\n"); + return 1; + } + if (!event->Text) { + mp_msg(MSGT_GLOBAL, MSGL_WARN, "Empty event!\n"); + return 1; + } + init_render_context(event); text_info.length = 0; @@ -1521,14 +1530,7 @@ pen.y = 0; previous = 0; num_glyphs = 0; - - p = event->Text; - if (!p) { - mp_msg(MSGT_GLOBAL, MSGL_WARN, "Empty event!\n"); - return 1; - } - // Event parsing. while (1) { render_context.effect_type = EF_NONE;