diff options
Diffstat (limited to 'libvo/vo_gl.c')
-rw-r--r-- | libvo/vo_gl.c | 4 |
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++) { |