summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libvo/gl_common.c1
1 files changed, 1 insertions, 0 deletions
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