[Bf-blender-cvs] [c09f61a9157] master: RNA: Image API: Fix error in NULL check in rna_Image_gl_touch

Clément Foucault noreply at git.blender.org
Wed Jul 29 23:06:47 CEST 2020


Commit: c09f61a9157ddee0e186db52fb7ac0f4cdae09da
Author: Clément Foucault
Date:   Wed Jul 29 17:12:02 2020 +0200
Branches: master
https://developer.blender.org/rBc09f61a9157ddee0e186db52fb7ac0f4cdae09da

RNA: Image API: Fix error in NULL check in rna_Image_gl_touch

This check was always returning true.

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

M	source/blender/makesrna/intern/rna_image_api.c

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

diff --git a/source/blender/makesrna/intern/rna_image_api.c b/source/blender/makesrna/intern/rna_image_api.c
index 1dcb10ed466..a57efbcf1b3 100644
--- a/source/blender/makesrna/intern/rna_image_api.c
+++ b/source/blender/makesrna/intern/rna_image_api.c
@@ -237,7 +237,7 @@ static int rna_Image_gl_touch(Image *image, ReportList *reports, int frame)
 
   BKE_image_tag_time(image);
 
-  if (image->gputexture[TEXTARGET_2D] == NULL) {
+  if (image->gputexture[TEXTARGET_2D][0] == NULL) {
     error = rna_Image_gl_load(image, reports, frame);
   }



More information about the Bf-blender-cvs mailing list