1
mirror of https://github.com/mpv-player/mpv synced 2024-10-02 16:25:33 +02:00

Make genEOSD behaviour with NULL data more explicit

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19941 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reimar 2006-09-22 20:13:21 +00:00
parent 2dd3f3f55a
commit 4e6749d0ef

View File

@ -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++) {