[Bf-blender-cvs] [9ace7e24397] master: Fix T74925: Texture Paint Stencil Mask crash

Philipp Oeser noreply at git.blender.org
Thu Mar 19 15:26:50 CET 2020


Commit: 9ace7e2439781457bed40994519a26cd22e63a78
Author: Philipp Oeser
Date:   Thu Mar 19 12:47:06 2020 +0100
Branches: master
https://developer.blender.org/rB9ace7e2439781457bed40994519a26cd22e63a78

Fix T74925: Texture Paint Stencil Mask crash

Use first texture if we dont have an ImageUser.

Maniphest Tasks: T74925

Differential Revision: https://developer.blender.org/D7181

===================================================================

M	source/blender/gpu/intern/gpu_draw.c

===================================================================

diff --git a/source/blender/gpu/intern/gpu_draw.c b/source/blender/gpu/intern/gpu_draw.c
index 348b9dddba9..350c616e359 100644
--- a/source/blender/gpu/intern/gpu_draw.c
+++ b/source/blender/gpu/intern/gpu_draw.c
@@ -877,7 +877,7 @@ GPUTexture *GPU_texture_from_blender(Image *ima, ImageUser *iuser, ImBuf *ibuf,
   BKE_image_tag_time(ima);
 
   /* Test if we already have a texture. */
-  GPUTexture **tex = gpu_get_image_gputexture(ima, textarget, iuser->multiview_eye);
+  GPUTexture **tex = gpu_get_image_gputexture(ima, textarget, iuser ? iuser->multiview_eye : 0);
   if (*tex) {
     return *tex;
   }



More information about the Bf-blender-cvs mailing list