Fix T64758: crash loading certain DDS textures
authorBrecht Van Lommel <brechtvanlommel@gmail.com>
Tue, 21 May 2019 11:00:43 +0000 (13:00 +0200)
committerBrecht Van Lommel <brechtvanlommel@gmail.com>
Tue, 21 May 2019 11:00:43 +0000 (13:00 +0200)
source/blender/gpu/intern/gpu_draw.c

index 2220eef..638729d 100644 (file)
@@ -757,7 +757,7 @@ void GPU_create_gl_tex_compressed(unsigned int *bind, int textarget, Image *ima,
 
   if (textarget == GL_TEXTURE_2D && GPU_upload_dxt_texture(ibuf, use_srgb) == 0) {
     glDeleteTextures(1, (GLuint *)bind);
-    GPU_create_gl_tex(bind, ibuf->rect, NULL, ibuf->x, ibuf->x, textarget, mipmap, use_srgb, ima);
+    GPU_create_gl_tex(bind, ibuf->rect, NULL, ibuf->x, ibuf->y, textarget, mipmap, use_srgb, ima);
   }
 
   glBindTexture(textarget, 0);