summaryrefslogtreecommitdiffstats
path: root/video/out/opengl/utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'video/out/opengl/utils.c')
-rw-r--r--video/out/opengl/utils.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/video/out/opengl/utils.c b/video/out/opengl/utils.c
index 38982e501e..34f4736705 100644
--- a/video/out/opengl/utils.c
+++ b/video/out/opengl/utils.c
@@ -84,10 +84,7 @@ void gl_upload_tex(GL *gl, GLenum target, GLenum format, GLenum type,
int y_max = y + h;
if (w <= 0 || h <= 0 || !bpp)
return;
- if (stride < 0) {
- data += (h - 1) * stride;
- stride = -stride;
- }
+ assert(stride > 0);
gl->PixelStorei(GL_UNPACK_ALIGNMENT, get_alignment(stride));
int slice = h;
if (gl->mpgl_caps & MPGL_CAP_ROW_LENGTH) {