diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-02-11 04:34:41 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-02-11 04:34:41 +0300 |
commit | 52cfc620c8cc3125282d8dd66df312ffb576569c (patch) | |
tree | 2a8a44c61a76de8289dfbe603127b00576ad0407 /source/blender/editors/transform/transform_convert_gpencil.c | |
parent | 2d252b6d26f90f81f2a2dc7a3031c407dc8a643c (diff) |
Fix T83013: Annotation with hidden object in sculpt mode crashes
This just avoids the crash, the annotation tool still doesn't work.
Larger changes will be needed to resolve this, see T85532.
Diffstat (limited to 'source/blender/editors/transform/transform_convert_gpencil.c')
-rw-r--r-- | source/blender/editors/transform/transform_convert_gpencil.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/transform/transform_convert_gpencil.c b/source/blender/editors/transform/transform_convert_gpencil.c index 0a742ec4470..deb18b50a22 100644 --- a/source/blender/editors/transform/transform_convert_gpencil.c +++ b/source/blender/editors/transform/transform_convert_gpencil.c @@ -688,7 +688,7 @@ void createTransGPencil(bContext *C, TransInfo *t) Depsgraph *depsgraph = CTX_data_ensure_evaluated_depsgraph(C); const Scene *scene = CTX_data_scene(C); ToolSettings *ts = scene->toolsettings; - Object *obact = CTX_data_active_object(C); + Object *obact = OBACT(t->view_layer); bGPdata *gpd = obact->data; BLI_assert(gpd != NULL); |