Point Density: Prevent crash when scene is not sent to calc_point_density()
This commit is contained in:
parent
5f95a4fb33
commit
d6059e991a
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue