[Bf-blender-cvs] [d6059e9] master: Point Density: Prevent crash when scene is not sent to calc_point_density()
Sergey Sharybin
noreply at git.blender.org
Sun Nov 8 06:20:33 CET 2015
Commit: d6059e991afe3e838044da894f605e5a5928ae7f
Author: Sergey Sharybin
Date: Sun Nov 8 10:10:55 2015 +0500
Branches: master
https://developer.blender.org/rBd6059e991afe3e838044da894f605e5a5928ae7f
Point Density: Prevent crash when scene is not sent to calc_point_density()
===================================================================
M source/blender/makesrna/intern/rna_nodetree.c
===================================================================
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c
index 2b11137..cf6097b 100644
--- a/source/blender/makesrna/intern/rna_nodetree.c
+++ b/source/blender/makesrna/intern/rna_nodetree.c
@@ -3028,6 +3028,11 @@ void rna_ShaderNodePointDensity_density_calc(bNode *self,
NodeShaderTexPointDensity *shader_point_density = self->storage;
PointDensity pd;
+ if (scene == NULL) {
+ *length = 0;
+ return;
+ }
+
*length = 4 * shader_point_density->resolution *
shader_point_density->resolution *
shader_point_density->resolution;
More information about the Bf-blender-cvs
mailing list