Fix T80630: potential crash in volume grids in Eevee shaders

Found by address sanitizer.
This commit is contained in:
Brecht Van Lommel 2020-09-15 14:09:01 +02:00
parent 8f7ab26935
commit 7177a580cc

@ -459,6 +459,7 @@ GPUNodeLink *GPU_volume_grid(GPUMaterial *mat,
GPUNodeLink *transform_link = gpu_node_link_create(); GPUNodeLink *transform_link = gpu_node_link_create();
transform_link->link_type = GPU_NODE_LINK_VOLUME_GRID_TRANSFORM; transform_link->link_type = GPU_NODE_LINK_VOLUME_GRID_TRANSFORM;
transform_link->volume_grid = link->volume_grid; 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 /* 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. */ * bring the into standard range without having to modify the grid values. */