# HG changeset patch # User eugeni # Date 1157304304 0 # Node ID d89179256560e31a5005a5599416e0a9652949b7 # Parent 8b8288f9a28f87781e1bea568e54c97a1daf38b8 More checks in ass_render_event. diff -r 8b8288f9a28f -r d89179256560 libass/ass_render.c --- 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;