summaryrefslogtreecommitdiffstats
path: root/libvo
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-09-22 20:13:21 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-09-22 20:13:21 +0000
commit4e6749d0ef21b9d7b2562bdb381461ec17fe7234 (patch)
tree31b6ee4baa0b35803a2feca754bd681f7fe21539 /libvo
parent2dd3f3f55a1a676ec83f3c48b3c251f9d9999931 (diff)
downloadmpv-4e6749d0ef21b9d7b2562bdb381461ec17fe7234.tar.bz2
mpv-4e6749d0ef21b9d7b2562bdb381461ec17fe7234.tar.xz
Make genEOSD behaviour with NULL data more explicit
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19941 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo')
-rw-r--r--libvo/vo_gl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libvo/vo_gl.c b/libvo/vo_gl.c
index fbc2b6cfda..5a8de962d3 100644
--- a/libvo/vo_gl.c
+++ b/libvo/vo_gl.c
@@ -251,10 +251,10 @@ static void genEOSD(ass_image_t *img) {
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++) {