diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2021-05-18 16:42:26 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2021-05-18 16:42:26 +0300 |
commit | a9da73ab95f07b7965df133edb6f32429ccb7302 (patch) | |
tree | 91258f8081e7dac5c1288ed145c8acb4f69a4d0b | |
parent | b1584775515b9830d277343db7a25701fd054578 (diff) |
Fix T88370: GPencil render crash when use viewlayer and masking
When filtering the render using view layer, could be possible the mask is NULL and just need to be ignored.
-rw-r--r-- | source/blender/draw/engines/gpencil/gpencil_engine.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/draw/engines/gpencil/gpencil_engine.c b/source/blender/draw/engines/gpencil/gpencil_engine.c index 8bb336ebc96..32884eb9e3f 100644 --- a/source/blender/draw/engines/gpencil/gpencil_engine.c +++ b/source/blender/draw/engines/gpencil/gpencil_engine.c @@ -819,7 +819,10 @@ static void gpencil_draw_mask(GPENCIL_Data *vedata, GPENCIL_tObject *ob, GPENCIL } GPENCIL_tLayer *mask_layer = gpencil_layer_cache_get(ob, i); - BLI_assert(mask_layer); + /* When filtering by viewlayer, the mask could be null and must be ignored. */ + if (mask_layer == NULL) { + continue; + } DRW_draw_pass(mask_layer->geom_ps); } |