Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonio Vazquez <blendergit@gmail.com>2021-05-18 16:42:26 +0300
committerAntonio Vazquez <blendergit@gmail.com>2021-05-18 16:42:26 +0300
commita9da73ab95f07b7965df133edb6f32429ccb7302 (patch)
tree91258f8081e7dac5c1288ed145c8acb4f69a4d0b /source/blender/draw/engines/gpencil/gpencil_engine.c
parentb1584775515b9830d277343db7a25701fd054578 (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.
Diffstat (limited to 'source/blender/draw/engines/gpencil/gpencil_engine.c')
-rw-r--r--source/blender/draw/engines/gpencil/gpencil_engine.c5
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);
}