From 0ddf1709175512266d5cb73aa205abb740b0fb89 Mon Sep 17 00:00:00 2001 From: reimar Date: Sun, 14 Aug 2005 19:38:16 +0000 Subject: [PATCH] extra check for glUploadTex to avoid a possible hang. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16224 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/gl_common.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libvo/gl_common.c b/libvo/gl_common.c index ab9358ef1c..78aa26e872 100644 --- a/libvo/gl_common.c +++ b/libvo/gl_common.c @@ -330,6 +330,7 @@ void glUploadTex(GLenum target, GLenum format, GLenum type, const char *data, int stride, int x, int y, int w, int h, int slice) { int y_max = y + h; + if (w <= 0 || h <= 0) return; if (slice <= 0) slice = h; // this is not always correct, but should work for MPlayer