diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-03-15 13:54:36 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-03-15 14:03:49 +0300 |
commit | 59f51942655e545cef669e9fb4c9cdc9ea44f905 (patch) | |
tree | 8d663fd5821ec747487d26d6b0b247569054edda /source | |
parent | b8feef59c8b463dfec0b991bf40554947c96bff1 (diff) |
Fix potential NULL pointer de-reference creating liquid geometry
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/fluid.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/fluid.c b/source/blender/blenkernel/intern/fluid.c index 56dc671a909..366137b5fa6 100644 --- a/source/blender/blenkernel/intern/fluid.c +++ b/source/blender/blenkernel/intern/fluid.c @@ -3271,12 +3271,12 @@ static Mesh *create_liquid_geometry(FluidDomainSettings *mds, Mesh *orgmesh, Obj } me = BKE_mesh_new_nomain(num_verts, 0, 0, num_faces * 3, num_faces); - mverts = me->mvert; - mpolys = me->mpoly; - mloops = me->mloop; if (!me) { return NULL; } + mverts = me->mvert; + mpolys = me->mpoly; + mloops = me->mloop; /* Get size (dimension) but considering scaling scaling. */ copy_v3_v3(cell_size_scaled, mds->cell_size); |