diff options
author | Nicholas Bishop <nicholasbishop@gmail.com> | 2012-06-05 03:14:57 +0400 |
---|---|---|
committer | Nicholas Bishop <nicholasbishop@gmail.com> | 2012-06-05 03:14:57 +0400 |
commit | 4260804c006d37ff44ce958719b52d2ecc4d38d7 (patch) | |
tree | 721a4b69cc2e02af9b4dff4fe3fab1ef358807dc /source/blender/blenkernel | |
parent | 2d290040a1fea8319f33a982823bea13d1d95348 (diff) |
Fix NULL free warning in multires.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/intern/multires.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/multires.c b/source/blender/blenkernel/intern/multires.c index d818ca09f20..4cbfb4f0f3e 100644 --- a/source/blender/blenkernel/intern/multires.c +++ b/source/blender/blenkernel/intern/multires.c @@ -1058,7 +1058,8 @@ static void multiresModifier_disp_run(DerivedMesh *dm, Mesh *me, DerivedMesh *dm /* if needed, reallocate multires paint mask */ if (gpm && gpm->level < key.level) { gpm->level = key.level; - MEM_freeN(gpm->data); + if (gpm->data) + MEM_freeN(gpm->data); gpm->data = MEM_callocN(sizeof(float) * key.grid_area, "gpm.data"); } |