diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-03-08 04:23:28 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-03-08 04:23:28 +0400 |
commit | 52db32bb53cf4d1b8b098238b1e896e8502027d2 (patch) | |
tree | 88465e8231b53343ac213332d988952afb42dccb /source/blender/modifiers/intern/MOD_fluidsim_util.c | |
parent | 6bed106ed4b0701bdb404a87dfa0c4805dc4bb60 (diff) |
fix for 2 crashes from missing NULL checks.
Diffstat (limited to 'source/blender/modifiers/intern/MOD_fluidsim_util.c')
-rw-r--r-- | source/blender/modifiers/intern/MOD_fluidsim_util.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/source/blender/modifiers/intern/MOD_fluidsim_util.c b/source/blender/modifiers/intern/MOD_fluidsim_util.c index dc0c4d5ad86..e9563b55d47 100644 --- a/source/blender/modifiers/intern/MOD_fluidsim_util.c +++ b/source/blender/modifiers/intern/MOD_fluidsim_util.c @@ -152,9 +152,8 @@ void fluidsim_init(FluidsimModifierData *fluidmd) void fluidsim_free(FluidsimModifierData *fluidmd) { - if(fluidmd) { - if(fluidmd->fss->meshVelocities) - { + if (fluidmd && fluidmd->fss) { + if (fluidmd->fss->meshVelocities) { MEM_freeN(fluidmd->fss->meshVelocities); fluidmd->fss->meshVelocities = NULL; } |