diff libvo/vo_gl.c @ 19935:698b1d68ac83

Make genEOSD behaviour with NULL data more explicit
author reimar
date Fri, 22 Sep 2006 20:13:21 +0000
parents 864dcc4f0408
children f810e12fce63
line wrap: on
line diff
--- a/libvo/vo_gl.c	Fri Sep 22 19:58:43 2006 +0000
+++ b/libvo/vo_gl.c	Fri Sep 22 20:13:21 2006 +0000
@@ -251,10 +251,10 @@
   GLint scale_type = (scaled_osd) ? GL_LINEAR : GL_NEAREST;
   ass_image_t *i;
   clearEOSD();
+  if (!img)
+    return;
   for (i = img; i; i = i->next)
     eosdtexCnt++;
-  if (!eosdtexCnt)
-    return;
   eosdtex = calloc(eosdtexCnt, sizeof(GLuint));
   glGenTextures(eosdtexCnt, eosdtex);
   for (i = img, curtex = eosdtex; i; i = i->next, curtex++) {