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.
This commit is contained in:
Sergey Sharybin 2020-05-12 15:49:31 +02:00
parent 94cbfb71bc
commit 08b4c9a815
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}