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:
parent
94cbfb71bc
commit
08b4c9a815
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue