[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37371] branches/cycles/source/blender/ nodes/intern/SHD_nodes: Cycles: GLSL error fix for image and environment nodes with no datablock assigned.

Brecht Van Lommel brechtvanlommel at pandora.be
Fri Jun 10 18:41:32 CEST 2011


Revision: 37371
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=37371
Author:   blendix
Date:     2011-06-10 16:41:31 +0000 (Fri, 10 Jun 2011)
Log Message:
-----------
Cycles: GLSL error fix for image and environment nodes with no datablock assigned.

Modified Paths:
--------------
    branches/cycles/source/blender/nodes/intern/SHD_nodes/SHD_tex_environment.c
    branches/cycles/source/blender/nodes/intern/SHD_nodes/SHD_tex_image.c

Modified: branches/cycles/source/blender/nodes/intern/SHD_nodes/SHD_tex_environment.c
===================================================================
--- branches/cycles/source/blender/nodes/intern/SHD_nodes/SHD_tex_environment.c	2011-06-10 14:03:51 UTC (rev 37370)
+++ branches/cycles/source/blender/nodes/intern/SHD_nodes/SHD_tex_environment.c	2011-06-10 16:41:31 UTC (rev 37371)
@@ -58,6 +58,9 @@
 	Image *ima= (Image*)node->id;
 	ImageUser *iuser= NULL;
 
+	if(!ima)
+		return 0;
+
 	return GPU_stack_link(mat, "node_tex_environment", in, out, GPU_image(ima, iuser));
 }
 

Modified: branches/cycles/source/blender/nodes/intern/SHD_nodes/SHD_tex_image.c
===================================================================
--- branches/cycles/source/blender/nodes/intern/SHD_nodes/SHD_tex_image.c	2011-06-10 14:03:51 UTC (rev 37370)
+++ branches/cycles/source/blender/nodes/intern/SHD_nodes/SHD_tex_image.c	2011-06-10 16:41:31 UTC (rev 37371)
@@ -58,6 +58,9 @@
 	Image *ima= (Image*)node->id;
 	ImageUser *iuser= NULL;
 
+	if(!ima)
+		return 0;
+
 	return GPU_stack_link(mat, "node_tex_image", in, out, GPU_image(ima, iuser));
 }
 




More information about the Bf-blender-cvs mailing list