[Bf-blender-cvs] [222ed9f7817] master: Fix T80943: return early when field to visualize is NULL

Jacques Lucke noreply at git.blender.org
Tue Sep 22 10:43:22 CEST 2020


Commit: 222ed9f78170116e1739a5cef65d31322d72f507
Author: Jacques Lucke
Date:   Tue Sep 22 10:42:52 2020 +0200
Branches: master
https://developer.blender.org/rB222ed9f78170116e1739a5cef65d31322d72f507

Fix T80943: return early when field to visualize is NULL

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

M	source/blender/draw/intern/draw_fluid.c

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

diff --git a/source/blender/draw/intern/draw_fluid.c b/source/blender/draw/intern/draw_fluid.c
index d9bd94b480e..a21402e6392 100644
--- a/source/blender/draw/intern/draw_fluid.c
+++ b/source/blender/draw/intern/draw_fluid.c
@@ -316,6 +316,10 @@ static GPUTexture *create_field_texture(FluidDomainSettings *fds, bool single_pr
       return NULL;
   }
 
+  if (field == NULL) {
+    return NULL;
+  }
+
   GPUTexture *tex = create_volume_texture(fds->res, texture_format, data_format, field);
   swizzle_texture_channel_single(tex);
   return tex;



More information about the Bf-blender-cvs mailing list