[MPlayer-cvslog] r19656 - trunk/libass/ass_render.c

eugeni subversion at mplayerhq.hu
Sun Sep 3 19:25:05 CEST 2006


Author: eugeni
Date: Sun Sep  3 19:25:04 2006
New Revision: 19656

Modified:
   trunk/libass/ass_render.c

Log:
More checks in ass_render_event.


Modified: trunk/libass/ass_render.c
==============================================================================
--- trunk/libass/ass_render.c	(original)
+++ trunk/libass/ass_render.c	Sun Sep  3 19:25:04 2006
@@ -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;



More information about the MPlayer-cvslog mailing list