[Bf-blender-cvs] [7347228d562] blender-v2.90-release: Fix T80630: potential crash in volume grids in Eevee shaders

Brecht Van Lommel noreply at git.blender.org
Mon Sep 21 09:50:36 CEST 2020


Commit: 7347228d562ff06f8b14c912411ee00a60256330
Author: Brecht Van Lommel
Date:   Tue Sep 15 14:09:01 2020 +0200
Branches: blender-v2.90-release
https://developer.blender.org/rB7347228d562ff06f8b14c912411ee00a60256330

Fix T80630: potential crash in volume grids in Eevee shaders

Found by address sanitizer.

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

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

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

diff --git a/source/blender/gpu/intern/gpu_node_graph.c b/source/blender/gpu/intern/gpu_node_graph.c
index 096320dc43e..d29f669e189 100644
--- a/source/blender/gpu/intern/gpu_node_graph.c
+++ b/source/blender/gpu/intern/gpu_node_graph.c
@@ -459,6 +459,7 @@ GPUNodeLink *GPU_volume_grid(GPUMaterial *mat,
   GPUNodeLink *transform_link = gpu_node_link_create();
   transform_link->link_type = GPU_NODE_LINK_VOLUME_GRID_TRANSFORM;
   transform_link->volume_grid = link->volume_grid;
+  transform_link->volume_grid->users++;
 
   /* Two special cases, where we adjust the output values of smoke grids to
    * bring the into standard range without having to modify the grid values. */



More information about the Bf-blender-cvs mailing list