diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2020-05-12 16:49:31 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2020-05-12 16:49:31 +0300 |
commit | 08b4c9a815c0426bbba9738bce1b10ea4acdaf48 (patch) | |
tree | 88e7b2d622ea5db96bbcdc65eb3fb28a8da01213 | |
parent | 94cbfb71bcf4f0499301f7c6f201124d8740cacf (diff) |
Multires: Correct NULL-pointer check
There is some hard-to-reproduce scenario when top level
would have masks allocated, but without masks on the sculpt
level.
Need to check proper array before accessing its elements.
The check for top-level masks is done by the caller.
-rw-r--r-- | source/blender/blenkernel/intern/multires_reshape_smooth.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/multires_reshape_smooth.c b/source/blender/blenkernel/intern/multires_reshape_smooth.c index 514608a0f1d..d99e27ad9dd 100644 --- a/source/blender/blenkernel/intern/multires_reshape_smooth.c +++ b/source/blender/blenkernel/intern/multires_reshape_smooth.c @@ -127,7 +127,7 @@ static float interpolate_masks_grid(const MultiresReshapeSmoothContext *reshape_ const GridCoord *grid_coord) { const MultiresReshapeContext *reshape_context = reshape_smooth_context->reshape_context; - if (reshape_context->grid_paint_masks == NULL) { + if (reshape_context->orig.grid_paint_masks == NULL) { return 0.0f; } |