extra check for glUploadTex to avoid a possible hang.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16224 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reimar 2005-08-14 19:38:16 +00:00
parent 5543cc2bf5
commit 0ddf170917
1 changed files with 1 additions and 0 deletions

View File

@ -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